No, Age of Empires 2 has never been free BUT nobody can deny that the two expansions (The Conquerors, Age of Kings) made Age of Empires 2 famous through illegal torrent distribution and CD-ROMs. Then you have some individuals sharing their Age of Empires 2 CD discs with neighbors and family.
However if you own a copy of Age of Empires 2 through steam or CD there is a free community patch on Voobly.com that overloads your game with more civilizations from various DLCs. It’s Multiplayer supported.
All things considered Age of Empires 2 Definitive Edition is the most played game in the entire series, you can buy it from Steam or Microsoft Store. To be honest, Steam is the best right now since you can access/mod your game installation folder and a neat feature to verify game files integrity in case something goes wrong with your game steam will only download the missing files unlike MS store.