This study investigated the isotope effects of δ13C and δ15N and microbial response during biodegradation of hydrocarbons by biostimulation with nitrate or compost in the petroleum-contaminated soil. Compost and KNO3 amendments promoted the total petroleum hydrocarbon (TPH) removal accompanied by a significant increase of Actinobacteria and Firmicutes phyla. Soil alpha diversity decreased after 90 days of biostimulation. An inverse significant carbon isotope effect (εc = 16.6 ± 0.8‰) and strong significant nitrogen isotope effect (εN = -24.20 ± 9.54‰) were shown by the KNO3 supplementation. For compost amendment, significant carbon and nitrogen isotope effect were εc = 38.8 ± 1.1‰ and εN = -79.49 ± 16.41‰, respectively. A clear difference of the carbon and nitrogen stable isotope fractionation was evident by KNO3 or compost amendment, which indicated that the mechanisms of petroleum degradation by adding compost or KNO3 may be different.