The invention discloses a method for detection of maltopentaose by ultra-high performance liquid chromatography-mass spectrometry. The method includes the steps of: (1) taking an appropriate amount ofmaltopentaose, adding water for dissolving to prepare a test solution of certain solution; (2) performing sample introduction, and conducting detection according to the following chromatographic andmass spectrometric conditions that: according to the chromatographic conditions: Waters Xbridge BEH Amide 2.1*100mm is adopted as the chromatographic column, acetonitrile-water is used as the mobile phase for gradient elution, 87% acetonitrile can be maintained in 0-15min, and in 15-20min, 87% acetonitrile gradually decreases to 15% acetonitrile, and in 20-30min, 15% acetonitrile is maintained; according to the mass spectrometric conditions: an ESI source is taken, a selected ion monitoring (SIM) mode is used, the fragmentor is 130v, the sheath gas flow is 12L / min, the caplliary voltage is 4000v, the accurate mass number [M-H]<->827.4 is extracted, and the common logarithm of concentration and peak area is utilized for linear quantitation. The method has the characteristics of accurate qualitative analysis, high sensitivity, high precision, good linearity and simple operation, and is suitable for analysis and detection of maltopentose.