Juventus' game at Bologna on Sunday is off due to snow and Milan took full advantage to move two points clear of the Turin side having fallen behind after 19 minutes in north-east Italy when Antonio Di Natale's shot deflected in off Thiago Silva.
Lopez, signed from Catania last month after Milan failed to land Carlos Tevez from Manchester City, netted his first goal for the champions when he scored on the rebound 12 minutes from time after coming on as a substitute.
Half Italian, half Egyptian teenager El Shaarawy, starting in place of the suspended Ibrahimovic, had a hand in Lopez's goal and then sealed the win himself when he combined with the Argentine again five minutes from time.
"I'm not just content, I'm really happy because scoring for this team has always been my dream," Lopez told reporters.
"El Shaarawy is young but he's growing a lot. This group is strong. Everyone gives their all when they get on the pitch."
Milan, who lost 2-1 at home to Juventus in Wednesday's Italian Cup semi-final first leg, had failed to win in their last two league games.
The rot was stopped in style in the end and victory meant Massimiliano Allegri's side moved to 47 points from 23 matches, jumping ahead of Juve who have two games in hand. Udinese stayed fourth and are now six points adrift of Milan.
Cagliari beat fellow mid-table side Palermo 2-1 in Saturday's other game in Sardinia.
The Parma-Fiorentina game on Sunday has also fallen victim to the weather but three other matches are due to go ahead with two more scheduled for Monday.
Third-placed Lazio, who have 42 points, came from 2-0 down to triumph 3-2 at home to Cesena on Thursday in a game brought forward because Italy's rugby team were using Rome's Stadio Olimpico for Saturday's Six Nations defeat by England.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.