A novel method of ultrafast femtosecond laser surface processing (FLSP) combined with the post thermal oxidation (TO) treatment was employed to improve the corrosion resistance of AZ31B magnesium (Mg) alloys. FLSP with laser powers (< 100 mW) mainly creates the nanostructures on AZ31B alloy surfaces, while the higher laser powers (> 200 mW) induce the hierarchical micro/nanostructures. According to the electrochemical results, the corrosion resistance of AZ31B alloys in Cl− solutions is weakened after the FLSP. However, an obvious enhancement in corrosion resistance is found when the femtosecond (fs) laser-processed samples subjected to the TO treatment in the temperature range from 100 °C to 280 °C. TO treatment actually supports the oxidation and growth of the nanostructure to form a dense film, considerably improving its protective ability and enhancing the corrosion resistance of Mg alloys in Cl− solutions. The uniform corrosion is evidently inhibited and localized corrosion emerges on laser-processed samples after the TO treatment.