The development of cost-effective and high-performance electrocatalysts is crucial for the widespread application of direct methanol fuel cell. Herein, a convenient and robust method is developed to the controllable fabrication of Pd nanocrystals in situ immobilized on boron and nitrogen codoped mesoporous carbon spheres (Pd/BNMCS) as anode catalysts for the methanol oxidation reaction. The as-derived Pd/BNMCS hybrids are equipped with a series of useful structural features, such as large specific surface area, abundant mesoporous channels, presence of plentiful B and N atoms, well-dispersive Pd nanoparticles, and good electrical conductivity. As a consequence, the optimized Pd/BNMCS catalyst demonstrates superior electrocatalytic methanol oxidation properties in terms of a large electrochemically active surface area, high mass/specific activities, and reliable long-term stability, which are significantly better than those of traditional carbon black and undoped mesoporous carbon sphere supported Pd catalysts. This study highlights the potential of heteroatom codoped mesoporous carbon matrixes in the construction of advanced noble metal electrocatalysts for practical fuel cell applications.