"After a great deal of thought and a lot of work on our relationship, we have made the decision to end our marriage," the pair wrote on Twitter.
The two met in the late 1980s when Melinda joined Bill's Microsoft firm. They have three children.
They jointly run the Bill & Melinda Gates Foundation.
The organisation has spent billions fighting causes such as infectious diseases and encouraging vaccinations in children.
The Gates' - along with investor Warren Buffett - are behind the Giving Pledge, which calls on billionaires to commit to giving away the majority of their wealth to good causes.
Bill Gates is the fourth wealthiest person in the world, according to Forbes.