Cruise will partner with Microsoft and use its Azure cloud computing platform for its self-driving vehicles.

Microsoft's expertise could also help GM quicken digitization initiatives, including the use of artificial intelligence.

In exchange, Microsoft has agreed to take an equity stake in Cruise. Microsoft will join GM, Honda and other investors in a new equity investment totaling more than $2 billion combined, pushing Cruise's private market valuation to $30 billion.

That investment puts Cruise in the fast lane when it comes to the companies that are in the race to develop self-driving vehicles and its technology along with Waymo, the self-driving company that's majority owned by Alphabet and Argo AI, the Pittsburgh-based self-driving start-up back by Ford and Volkswagen.

GM's stock soared on the news, jumping 10 percent to a post-bankruptcy record high.