Donkey Kong is shown as a hero in the Donkey Kong Country series. But in multiple Mario games such as Mario vs. Donkey Kong, Donkey Kong has been a rival to Mario (despite the two being friends in spin-off games), similar to his predecesor who is currently Cranky Kong.
Mario vs. Donkey Kong
In the first game, Mario vs. Donkey Kong, when Donkey Kong heard about the new Mini-Mario toys, he rushed to the store to get his very own, but then he saw that they were already sold out. Then Donkey Kong came across a factory making Mini-Marios. So he breaks in, and takes some Mini-Marios from the working Toads. Then Mario catches him and spends the rest of the game trying to stop him from stealing the Mini Marios, as well as kidnapping the working Toads. After several journeys and battles of Mario rescuing the Mini Marios and Toads, Donkey Kong was sobbing while defeated. Mario then decided to console him and offer him one Mini Mario toy, which Donkey Kong happily accepted.
In other Mario vs. Donkey Kong games
In the second game, March of the Minis, during the grand opening and ribbon-cutting ceremony of a new amusement park, "Super Mini-Mario World", Mario offers Pauline, his VIP guest, a Mini-Mario. Donkey Kong, wanting to win Pauline's heart, offers her a Mini-Donkey Kong, but Pauline chose the Mini-Mario instead. Enraged, Donkey Kong ran through with Pauline, and Mario uses the Mini-Marios to save Pauline from Donkey Kong.
In Minis March Again, Mario and Pauline were selling Mini-Marios, and Donkey Knog was last in a long line. Then when Donkey Kong was about to get one, they ran out, so Donkey Kong kidnaps Pauline again, and Mario gets the Mini-Marios to track down Donkey Kong and rescue Pauline again.
In Mini-Land Mayhem, Mario and Pauline open another amusement park, "Mini-Land", and offers the first 100 guests a free Mini-Pauline. Donkey rushed for one, but Mario pointed out that he was the 101st guest and he can't get one, so Donkey Kong gets mad, and runs through the park, capturing Pauline again, so Mario gets the Mini-Marios to rescue Pauline from Donkey Kong once again.