Yes, along with a number of other US companies. This was done to stabilize the economy in the wake of the 2008 economic crisis. It was a very hot political topic at the time.
https://www.politico.com/story/2009/05/obama-reluctant-share...
https://www.politico.com/story/2009/05/obama-reluctant-share...
Did US govt. actually had an ownership stake in GM? Please provide some links to this effect.