Venegas began studies for a literary career, but gave them up to serve in the military. He rose in rank to lieutenant colonel, taking part in the fighting against the French Republic. He had retired from service at the time of the Napoleonic invasion of Spain, but returned then to active duty. He took part in the Battle of Bailén, and was named commander of a division in Andalucía. His services in the war with the French were valuable, and he demonstrated his intelligence, energy and courage. With the patronage of the minister Francisco Saavedra de Sangronis, he advanced rapidly.