Giuliani was on the president-elect's shortlist for secretary of state.
According to a statement by the Trump transition team, Giuliani apprised Trump of his withdrawl at a meeting on November 29. He sent a letter to Trump, who declined to accept at that time but accepted it later after being asked by Giuliani to withdraw his name.
Giuliani said that the decision was "not about me" and he joined the campaign because for his love for the country.
"It is about what is best for the country and the new administration. Before I joined the campaign I was very involved and fulfilled by my work with my law firm and consulting firm, and I will continue that work with even more enthusiasm," he said.
More From This Section
"From the vantage point of the private sector, I look forward to helping the President-elect in any way he deems necessary and appropriate," he added.
"Rudy Giuliani is an extraordinarily talented and patriotic American. I will always be appreciative of his 24/7 dedication to our campaign after I won the primaries and for his extremely wise counsel," Trump said.
"He is and continues to be a close personal friend, and as appropriate, I will call upon him for advice and can see an important place for him in the administration at a later date," the 70-year-old president-elect said.
Giuliani will remain the Vice Chairman of the Presidential transition team led by Vice President-elect Mike Pence.