To obtain the structural composition of basic nitrogen compounds in heavy oils at the molecular level,four heavy oils,i. e. high temperature coal tar pitch,petroleum atmospheric residue and their suspension bed hydrocrackin500 ℃ tail oil,were characterized by ultra-high resolution Fourier transform ion cyclotron resonance mass spectrome- try (ESI FT-ICR MS) and other analysis methods. The molecular compositions of the four samples were obtained,and the conversion law of basic nitrogen compounds in the hydrogenation process was revealed. The results showed that N1 basic nitrogen compounds in high temperature tar pitch were mainly dibenzoquinoline and triphenylquinoline compounds,and N2 compounds were mainly triphenylpyridinium pyrrole and tetraphenylpyridinium pyrrole compounds. N1 compounds in residual oil showed a continuous distribution state from quinoline,benzoquinoline to tetrabenzoquinoline compounds,and N2 compounds were mainly benzopyridine pyrrole and dibenzopyridine pyrrole compounds. The aver- age condensation degree of N1 and N2 compounds in residual oil were lower than that of high-temperature tar pitch, but their carbon number center of gravity were much higher than that of high-temperature tar pitch. There were quite a number of quinoline and pyridine pyrrole macromolecules with high condensation degree and long side chains in resid- ual oil,which were the most difficult to convert macromolecules in residual oil. During hydrocracking,basic N1 com- pounds in high temperature tar pitch mainly undergo hydrogenation saturation and alkyl side chain cleavage reactions, and the condensation degree of N2 compounds decreases as a whole. The DBE and carbon number of N1 and N2 com- pounds in residue hydrotreating tail oil were obviously narrowed. There were many basic nitrogen compounds with high condensation degree and large molecular weight that were difficult to be hydroconverted in residue hydrotreated tail oil. Therefore,it could be inferred that its hydrocracking performance was lower than that of high temperature tar pitch hydrotreated tail oil,and coking would be easier during secondary processing.