Following the capitulation of the French troops at the Battle of Bailén, Vedel, like the other high-ranking officers who were fortunate enough be returned to France, was sent before a court-martial, deprived of his rank and title, and imprisoned.