This paper introduces a homemade high-resolution miniature fiber optic spectrometer for LIBS detection. The circuit part of the system is mainly controlled by a cortex-M3 chip, transmits data to the personal computer (PC) through the Universal Serial BUS (USB2.0), and a set of spectrometer test software is finished. The optical system is based on Czerny-Turner imaging system, using 1800grv/mm plane diffraction grating, 16μm slit and 2048 pixels linear array CCD as detector, high-resolution spectral output in the range of 335-455nm is required. By precisely calibration and testing, the precision of the system is 0.05nm, and the resolution of the wavelength at the blaze wavelength can up to 0.1nm which can fulfill the general LIBS detection.