He wrote: "I have made the decision to step down from both of the public boards on which I serve – Microsoft and Berkshire Hathaway – to dedicate more time to philanthropic priorities including global health and development, education, and my increasing engagement in tackling climate change.
"The leadership at the Berkshire companies and Microsoft has never been stronger, so the time is right to take this step."
Referring to Warren Buffett, chairman and chief executive officer of Berkshire Hathaway, he added: "Serving on the Berkshire board has been one of the greatest honors of my career. Warren and I were the best of friends long before I joined and will be long after.
"I look forward to our continued partnership as co-trustees of the Bill & Melinda Gates Foundation and co-founders of The Giving Pledge."