In his autobiography, ‘Hit Refresh’, the Microsoft CEO narrates how was contemplating leaving his job in order join his newly-married wife.

With his permanent residency coming in the way of his newly-wed wife joining him in the U.S., Satya Nadella surrendered his Green Card and applied for a H1-B visa, a move which gave him instant notoriety around the Microsoft Campus in Redmond, the Indian-born CEO has revealed.

In fact, at one point of time, early in his career, even with a Green Card in his hand, Mr. Nadella seriously contemplated leaving his job at the Microsoft and returning to India. This was because his wife Anu was not able to join him in Seattle, due to the existing U.S. law where the visa application of the spouse of a Green Card holder is rejected. The law continues even today.

“So why would I give up the coveted Green Card for temporary status?” Mr. Nadella writes in his book Hit Refresh, which officially releases in the US on Tuesday. Mr. Nadella married Anu in 1993. Following the wedding, he intended to bring his wife over to the US to live with him.

“Well, the H1-B enables spouses to come to the US while their husbands and wives are working here. Such is the perverse logic of this immigration law. There was nothing I could do about it. Anu was my priority. And that made my decision a simple one,” Mr. Nadella explains in his book.

Mr. Nadella says he went back to the U.S. embassy in Delhi in June of 1994 and told a clerk that he wanted to give back his Green Card and apply for a H-1B visa. “‘Why?’ the dumbfounded clerk asked. I said something about the crazy immigration policy and he shook his head and pushed a new form to me,” Mr. Nadella writes.

“The next morning, I returned to apply for a H1-B application. Miraculously, it all worked. Anu joined me (for good) in Seattle, where we would start a family and build a life together,” he says.

“What I didn’t expect was the instant notoriety around campus,” writes Mr. Nadella. “ ‘Hey, there goes the guy who gave up his green card.’” He says every other day someone would call him and ask for advice.

Mr. Nadella says much later, one of his colleagues, Kunal Bahl, did quit Microsoft when his H1-B ran out and his Green Card had not yet arrived.

“He returned to India and then founded Snapdeal, which today is worth more than $1 billion and employs five thousand people. Ironically, online, cloud-based companies like Snapdeal would play an important role in my future and that of Microsoft. And the lessons I learned in my former country continue to shape my present,” he says.