The song playing over the end credits of Megamind (2010) is "(I've Had) The Time of My Life"—the Bill Medley & Jennifer Warnes classic from Dirty Dancing (1987)—given a fun, upbeat rendition that fits the film's comedic, self-aware tone.
The choice is a deliberate nostalgic callback: the original is the quintessential "lift" duet; here, it underscores Megamind and Roxanne's partnership (and the film's playful relationship with tropes). The soundtrack also features original songs by Hans Zimmer and Lorne Balfe, but the credits belong to Medley & Warnes.