Deadpool is arguably one of the greatest characters Rob Liefeld ever created while working at Marvel Comics, but he didn't make him into a purely heroic superhero. When the Merc with a Mouth first arrived in the pages of The New Mutants #98, he wasn't fighting for the good guys.
Of course, he wasn't necessarily evil at this time either — he was, after all, a mercenary, so he took money to do pretty much whatever came his way. If this meant fighting for the good guys, that was fine, but it also meant that he fought for the bad guys as well.
He didn't just pick up his nickname because he liked the alliteration, and when Deadpool first showed up, he was taking cash from Tolliver to attack Cable and the New Mutants. Over time, he continued to take money from bad guys, but after a while, he moved away from that sort of activity.
Deadpool has grown into a much more heroic character of late, but he's still not 100% a good guy. Granted, he's not evil, and couldn't properly be called a villain either. At best, he's an anti-hero everybody likes having on their side, and he does try super hard to be a good guy... most of the time.