Maul was overconfident and unprepared
From the Novelisation of the Phantom Menace:
Darth Maul walked slowly to the edge of the melting pit, tattoed face bathed in sweat, eyes wild and bright with joy. The battle was finished. The last Jei was about to be dispatched. He smiled and shifted the remnant of his shattered lightsaber from one hand to the other, savouring the moment.
Eyes fixed on the Sith Lord, Obi-Wan Kenobi went deep inside himself, connecting with the Force he had worked so hard to understanding. Calming himself, stilling the trembling of his heart, and banishing his anger and fear, he called upon the last of his reserves. With clarity of purpose and strength of heart, he launched himself away from the side of the pit and catapulted back toward its lip. Imbued with the power of the Force, he cleared the rim easily, somersaulting behind the Sith Lord in a single smooth, powerful motion. Even as he landed, he was drawing Qui-Gon Jinn's fallen lightsaber to his outstretched hand.
Darth Maul whirled to confront him, shock and rage twisting his red and black face. But before he could act to save himself, Qui-Gon's lightsaber slashed through his chest, burning him with killing fire. The stricken Sith Lord howled in pain and disbelief.
This gives us a bit more insight into the incident than the film alone.
Essentially, Maul is suffering from the Sith's most common and greatest weakness. As Luke said to the Emperor,
"Your overconfidence is your weakness."
Maul is not in a fighting stance. He's not paying attention. He's not on the alert, he's convinced he's already won and there's just the dying left. At the same time, Obi-Wan is being everything a Jedi is supposed to be - calm, controlled, self-reliant, unemotional. The greatest strengths of a Jedi up against the biggest weakness of a Sith - and the Jedi won.
Let's also remember this line from Mark Twain:
The best swordsman in the world doesn't need to fear the second best swordsman in the world; no, the person for him to be afraid of is some ignorant antagonist who has never had a sword in his hand before; he doesn't do the thing he ought to do, and so the expert isn't prepared for him; he does the thing he ought not to do; and often it catches the expert out and ends him on the spot.
Again, this feeds back into overconfidence. Maul was certain that he outmatched his opponent in every way, so when Obi-Wan did the stupid thing and tried to attack a superior opponent on high ground, Maul wasn't expecting it.