Cholesterol and oxysterols are involved as key compounds in the development of severe neurodegenerative diseases and in neuroinflammation processes. Monitoring their concentration changes under pathological conditions is of interest to get insights into the role of lipids in diseases. For numerous years, liquid chromatography coupled to mass spectrometry has been the method of choice for metabolites identification and quantification in biological samples. However, sterols and oxysterols are relatively apolar molecules poorly adapted to electrospray ionization (ESI). To circumvent this drawback, we developed a novel and robust analytical method involving derivatization of these analytes in cholesteryl N-4-(N,N-dimethylamino)phenyl carbamates under alkaline conditions followed by ultra-performance liquid chromatography-high resolution mass spectrometry analysis (UPLC-HRMS). Optimized UPLC conditions led to the separation of a mixture of 11 derivatized sterols and oxysterols especially side chain substituted derivatives after 6 min of chromatographic run. High sensitivity time-of-flight mass analysis allowed analytes to be detected in the nanomolar range. The method was validated for the analysis of oxysterols and sterols in mice brain in respect of linearity, limits of quantification, accuracy, precision, analyte stability, and recovery according to the Food and Drug Administration (FDA) guidelines. The developed method was successfully applied to investigate the impact of lipopolysaccharide (LPS) treatment on the rat cerebral steroidome.