Now the richest man in the world, Gates' donation represent about 5% of his current $90bn fortune.
The Bill & Melinda Gates Foundation aims, among other goals, to enhance healthcare and reduce global poverty.
Since June 2015, Gates has regularly donated eight million shares each quarter.
Mr Gates' share in Microsoft is now just 1.3%.
Bill Gates made his largest single gift since the turn of the century, giving away Microsoft Corp shares that accounted for 5 per cent of his fortune, the world's biggest.
The recipient of this huge gift is unspecified in the regulatory filing, but if past practice holds, it's likely the Bill & Melinda Gates Foundation, helping to fuel the philanthropy's work in USA education and global health. Prior to this, Mr Gates gave away $16bn in Microsoft shares in 1999 and $5.1bn in 2000. That was the year Gates stepped down as Microsoft CEO, handing over the reins to the controversial Steve Ballmer.
"It's a change in how he distributes that asset", said Ben Silverman, research director at InsiderScore, noting that Gates has been reducing his stake methodically for years through share sales to fund his foundation.
Gates' most recent pledge takes his overall charitable donations to approximately $50 billion, based on the foundation's most recent financial statement.
Bill Gates is now the world's richest man, although last month he was briefly knocked off the top spot by Amazon's founder and CEO Jeff Bezos for a couple of hours after a brief surge in Amazon's share price. The estimated net worth of Gates as of July 2017 is $89.9 billion.