Fidelity and fidelity susceptibility are introduced to investigate the topological superconductors with end Majorana fermions. A general formalism is established to calculate the fidelity and fidelity susceptibility by solving Bogoliubov–de Gennes equations. Both clean and disordered systems are studied within this formalism, and the results show that the fidelity susceptibility serves as a valid indicator for the topological quantum phase transition which signals the appearance of Majorana fermions. Our study provides a useful tool to investigate the topological quantum phase transition in superconductors, which is helpful to find topological phases in various systems.