Significance The authors report herein a simple and high-yielding method for the one-pot conversion of primary alcohols into the corresponding methyl esters. A variety of aliphatic, allylic and benzylic alcohols can be readily and selectively transformed into the methyl esters in the presence of a ruthenium catalyst and crotononitrile as oxidant. Aldehydes are also oxidized under the developed conditions to the methyl esters in very good yields.