This study investigated the degradation of hydrocarbon-contaminated soil using compost, NPK 20:10:10 fertilizer, and cattle bile as biostimulants. In this study, 1000 g of homogenized contaminated soil was amended with 10.50 g of NPK fertilizer and 107.50 g of compost to achieve a nitrogen concentration of 0.2%. To establish a 0.4% nitrogen concentration, 23.90 g of NPK fertilizer, 243.54 g of compost, and 2 ml of cattle bile were used. These amendments were applied in various combinations to create the following microcosm treatments: A, B, C, D, A2, B2, C2, D2, and a control. The microcosms, along with the control were incubated for 6 weeks in triplicate. Throughout this period, several parameters were monitored every two weeks, including pH, nitrogen (N), potassium (K), phosphorus (P), moisture content, organic carbon, organic matter, total heterotrophic bacterial count (THBC), and total petroleum hydrocarbon (TPH) concentration. The results showed significant differences (p < 0.05) in TPH content across the microcosms during the four sampling periods. By the end of the 6-week incubation, the TPH residual concentration varied between 1.58 mg/kg and 20.61 mg/kg, corresponding to degradation rates of 98.43% and 79.58%, respectively, from an initial TPH concentration of 100.91 mg/kg. Microcosm B2 demonstrated the highest hydrocarbon removal efficiency (98.43%), while the control showed the lowest efficiency. The order of degradation efficiency among the microcosms was B2 > B (94.89%) > C (94.64%) > A (94.13%) > D2 (93.62%) > A2 (93.51%) > C2 (92.45%) > D (91.44%). The study also found that pH and nitrogen levels were related to the reduction in hydrocarbon content. Microcosms with a 0.4% nitrogen concentration showed a higher rate of nitrogen consumption compared to those with a 0.2% concentration. Additionally, changes in pH were observed as hydrocarbon degradation progressed. This study further applied cluster analysis, Bayesian statistics, and multiple linear regression to evaluate the effects of treatments on soil quality over time. Cluster analysis showed increasing dissimilarity between merged clusters, while Bayesian analysis revealed positive trends in parameter estimates in Weeks 2 and 4. Regression analysis indicated significant impacts of Weeks 2, 4, and 6 on Week 0, with F-statistics of 8.475 (p = 0.016), 9.804 (p = 0.004), and 3.759 (p = 0.037), though multicollinearity reduced the predictive power of individual coefficients. Overall, Microcosm B2 emerged as the most effective treatment option. The findings suggest that biostimulation using a combination of moisture, compost, NPK fertilizer, and cattle bile is an effective approach to achieving high efficiency in TPH degradation in hydrocarbon-contaminated soils.