The synthesis of nepetoidin B from readily and commercially available 3,4-dimethoxybenzaldehyde in an overall yield of 52% is achieved. The present three-step protocol involves Ramirez-Corey-Fuchs reaction, ruthenium-catalyzed anti-Markovnikov addition of a carboxylic acid to a terminal alkyne and demethylation using iodotrimethylsilane (Me3SiI) and quinoline. In this work, the two isomers of (Z, E)-nepetoidin B /(E, E)nepetoidin B and the single isomer of (E, E)-nepetoidin B can be obtained through the demethylation of (Z, E)-5 and (E, E)-5, respectively.