We describe the direct photodesorption of CO from the Ni 001 metal surface during the absorption of a short pulse of UV light by the adsorbate and account for the dynamics of the desorbing species coupled to electronic excitations of the substrate, which lead to energy dissipation. The interaction potentials and couplings for the ground and excited states are obtained from electronic structure calculations and from experimental information. The time evolution of CO vibrational populations is studied for propagating wavepackets for the adsorbate᎐substrate complex with a splitoperator algorithm, followed by a perturbative treatment of dissipation and response to the light pulse. Direct photodesorption is found to occur predominantly in the excited electronic state and is compatible with dissipation. Results are presented for CO photodesorption by Gaussian pulses with several durations to show the effect of light pulse shapes on the time evolution of populations. Shorter pulses in the femtosecond range are shown to give relatively larger populations of excited vibrational states during the desorption of CO.