Hansen was born Max Josef Haller in Mannheim, Imperial Germany as an illegitimate child to the Danish actress Eva Haller and a Jewish father, by other sources a Swedish Officer Schürer von Waldheim. He grew up with foster-parents at Munich, where he first appeared at the Cabaret Simplizissimus at the age of 17. In 1914 he moved to Vienna and appeared in several smaller theatres as a singer and comedian.
In 1924, Hansen created the tenor role of Baron Kolomán Zsupán in Gräfin Mariza at Hubert Marischka's Theater an der Wien in Vienna. This production moved to the Metropoltheater in Berlin after 900 performances. In Berlin he founded the Kabarett der Komiker with Paul Morgan and Kurt Robitschek. Hansen was engaged by Max Reinhardt for his revival of Offenbach's La belle Hélène  and by Erik Charell for his production of Lehar's The Merry Widow. Hansen's greatest stage success was in creating the role of Leopold the waiter in Ralph Benatzky's operetta-musical The White Horse Inn, a part he also undertook in Richard Oswald's 1926 silent movie.
In 1932, Hansen satirised Adolf Hitler as a homosexual with his song "War'n Sie schon mal in mich verliebt?" ("Have you ever been in love with me?"), which caused the bitter hate of the Nazis. In contrast, he also parodied the opera and operetta soprano Gitta Alpár (in drag) in a film recording dating from the same year. He returned to Vienna in 1933 and worked again at the Theater an der Wien. In 1936 he met Zarah Leander on a Scandinavian tour and engaged her as his stage partner at Vienna. After Austria was invaded by Germany in 1938, Hansen emigrated to Denmark, where he founded his own theater at Copenhagen. Richard Tauber had written an operetta 'Franz im Glück' for him, which was due to be performed at the Theater an der Wien in the 1938/39 season; but the Anschluss in March 1938 put paid to that.
In 1951 he returned to Germany and was successful once again singing the role of Leopold the waiter (The White Horse Inn) in Hamburg and at Berlin's Theater am Nollendorfplatz. In 1953 Hansen moved back to Copenhagen, where he died in 1961.
Hansen was married to Austrian actress Lizzi Waldmüller and after 1939 to Britta Hansen. He had four children. His daughter Ann-Mari Max Hansen, born in 1949, and his son Max Hansen Jr., born in 1954, are both actors.
In 2004 the German director Douglas Wolfsperger portrayed Hansen in his documentary "War'n Sie schon mal in mich verliebt?"