Elon Musk is certainly a fascinating man. Not only has he built companies like SpaceX and Tesla Motors, but the entrepreneur is constantly imagining new tech and gadgets that could help others in a variety of ways. However, Musk wasn't always as independent as we thought he was. New research reveals that the CEO almost sold his commercial spaceflight company to Google a few years ago.

Bloomberg Businessweek published an excerpt from "Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future" by Ashley Vance this Monday. When the company posted its first quarter financial profit in 2013, people were surprised by how high the demand was for its electric car.

However, Elon Musk was very close to going bankrupt at the time.

"As Musk put his staff on crisis footing to save Tesla, he also began negotiating a deal to sell the company to Google through his friend Larry Page, the search giant's co-founder and chief executive officer, according to two people with direct knowledge of the deal," Vance wrote.

Spokesmen from Tesla and Google were unwilling to confirm the reports. Google cofounder Larry Page told Vance that he "didn't want to speculate on rumors" since "a car company is pretty far from what Google knows." 

These financial problems were partly because of the nature of Tesla's first customers, which Vance describes as "proto-typical early adopters who wanted a computer on wheels."

At this point, Musk had been reworking his car design for a few years. However, it still suffered from a few flaws; most notably a lack of certain safety features. Musk did a number of things to fix the device and the company, including firing some execs, switching staff around and more. But that wasn't enough. So, Musk approached Google in March 2013.

"[Musk] proposed that Google buy Tesla outright - with a healthy premium, the company would have cost about $6 billion at the time - and pony up another $5 billion in capital for factory expansions. He also wanted guarantees that Google wouldn't break up or shut down his company before it produced a third-generation electric car aimed at the mainstream auto market. He insisted that Page let him run a Google-owned Tesla for eight years, or until it began pumping out such a car. Page accepted the overall proposal and shook on the deal," Vance wrote.

During the negotiations, Tesla's sales quickly increased, and Musk's electric company was eventually able to make a profit. Musk ended negotiations and took the offer off the table.

You can read the full report here.

"Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future" will be available for purchase on May 19.