A microstructured array of 1254 electrodes on a substrate has been configured to generate an array of local minima of electric field strength with a periodicity of 120 $mu$m about 25 $mu$m above the substrate. By applying sinusoidally varying potentials to the electrodes, these minima can be made to move smoothly along the array. Polar molecules in low-field seeking quantum states can be trapped in these traveling potential wells. Recently, we experimentally demonstrated this by transporting metastable CO molecules at constant velocities above the substrate [Phys. Rev. Lett. 100 (2008) 153003]. Here, we outline and experimentally demonstrate how this microstructured array can be used to decelerate polar molecules directly from a molecular beam. For this, the sinusoidally varying potentials need to be switched on when the molecules arrive above the chip, their frequency needs to be chirped down in time, and they need to be switched off before the molecules leave the chip again. Deceleration of metastable CO molecules from an initial velocity of 360 m/s to a final velocity as low as 240 m/s is demonstrated in the 15-35 mK deep potential wells above the 5 cm long array of electrodes. This corresponds to a deceleration of almost $10^5$ $g$, and about 85 cm$^{-1}$ of kinetic energy is removed from the metastable CO molecules in this process.