In this study, the removal effect of free and immobilized bacteria on crude oil was determined. Sodium alginate and polyvinyl alcohol were used as embedding agent, and ramie was modified as an adsorbent to immobilize free bacteria. The conditions of immobilized pellets were optimized using the Response Surface Method, and the best combination was simulated and obtained by Design-Expert 8.0. The best degradation rate of immobilized bacteria was 75.52%. The degradation of free bacteria and immobilized bacteria showed that the selected microorganisms had a good degradation effect on petroleum hydrocarbons.