The EDL phases are of great importance in Mars exploration mission, while before which the deorbit braking is a key maneuver to ensure the smooth execution of the atmospheric entry process. Aiming at the problem of deorbit maneuver before Mars entry, a burn-coast optimal deorbit guidance method is presented. Based on the local linearization of the state equation, the analytical forms of state and costate variables are obtained. The solution equations of the optimal burn-coast deorbit guidance law are given through derivation of the necessary conditions for optimal deorbit maneuver. The simulation results show that the proposed guidance strategy has good robustness on the premise of guaranteeing optimality and guidance accuracy, providing theoretical reference for the future deorbit maneuver in Mars exploration.