So who was he fighting for?
He was part of the anti-Soviet Mujahideen in the 1980s, and was involved in the civil war of the Mujahideen provisional government of the early 90s. When the Taliban overthrew the Mujahideen government, Ahmad Shah Massoud continued the fight by banding together the Northern Alliance, a group of anti-Taliban Afghan fighters. Massoud was a supporter of a coalition government for a democratic and pluralist Afghanistan.
He was likely headed toward the presidency and opening up access to the world, except he was assassinated with a bomb hidden inside a video camera (tin-foil hats on tight) the DAY BEFORE 9/11:
https://en.wikipedia.org/wiki/Ahmad_Shah_Massoud#Assassination
Everything the other guy said, but let me add: Taliban rule wasn’t as unchallenged as it is now before the US invasion of Afghanistan. They still controlled most of the territory, but a good part of it was also controlled by the Northern Alliance who were still fighting the Taliban. The current strength of the Taliban in Afghanistan is a direct result of the US invasion.