Ballinamallard consolidated their third position in the league thanks to David Kee's curling effort after 65 minutes.
Home goalkeeper Andy Coleman saved from Ryan Campbell, Kee and Chris Curran in the first half while Gary Hamilton hit the bar for Glenavon.
Curran laid the ball off for Kee to cut in from the left and fire home.
After the break Hamilton fired straight into the arms of Alvin Rouse, Andy McGrory fired inches wide and Coleman saved well from Curran.
The win was a particularly welcome one for Mallards, who had won just one of their last five games, but the result sees Glenavon drop to 10th place in the Premiership.
Next up for Glenavon is a testing away trip to Coleraine while Ballinamallard travel to take on Glentoran at the Oval.