From 1805 onwards, Ruty took part to the campaigns of the "Grande Armée" during the War of the Third Coalition and War of the Fourth Coalition, serving as artillery park director for the Army Corps of Marshal Michel Ney, then Marshal Joachim Murat. A brigadier general from 1807, he served with distinction at the battle of Friedland. In 1808 he was created a baron of the Empire, serving as commander of the artillery school in Toulouse, before being sent to serve in Spain, towards the end of that year. He contributed significantly to the successful sieges of Ciudad Rodrigo and Almeida, before taking command of Marshal Jean-de-Dieu Soult's artillery in the armies of the South and of Andalusia. During this campaign he invented a type of howitzer that bears his name. In 1813, Ruty was recalled to France, and promoted to general of division, before being named commander of Marshal Nicolas Oudinot's Corps artillery during the Saxon campaign of the War of the Sixth Coalition. In November 1813, Ruty was created a count of the Empire. After Napoleon's abdication in 1814, Ruty served the Bourbon Restoration, but during the Hundred Days he joined the Emperor, who named him commander of the artillery of the Army of the North, with Ruty playing a significant role at the battle of Waterloo. General count de Ruty finished his military career as general inspector for artillery during the Second Restoration, subsequently serving as general director for gunpowders and saltpeter (1817), state counsellor (1818) and Peer of France from 1819.