White and Havertz scored braces to batter their London rivals 5-0
Messi curled in from a free kick to break the deadlock in the 27th minute. Five minutes later the Argentine doubled the lead, taking one touch to control a through ball from Philippe Coutinho before delivering a cool low finish.
Nabil El Zhar pulled a goal back for 14th-placed Leganes in the 68th minute. However, Messi made sure Barca kept all the points by hitting his third with three minutes left, controlling the ball on his chest and calmly chipping goalkeeper Ivan Cuellar from close range.
The Catalans are top of La Liga with 79 points after 31 games and have a 12-point advantage over second-placed Atletico Madrid, who visit champions Real Madrid in a local derby on Sunday.