Midfielder McShane’s 29th-minute shot from the centre of the box found the bottom right corner to give him his first goal of the season and his Dumfries side a 1-0 victory at Palmerston Park.
Before that, both teams had seen several shots saved or narrowly miss the target, with Queens striker Gavin Reilly setting the tone by forcing a save just two and a half minutes into the game.
Hibs battled hard in the second half with several attempts by French-born Congolese striker Dominique Malonga and in particular from fellow forward Jason Cummings who twice went close to scoring after he replaced Jake Sinclair on 59 minutes.
Late attempts went close for Queens’ Iain Russell and Daniel Carmichael but McShane’s first-half goal was enough for the Doonhamers to celebrate their first league win over Hibs since 1964.
The result keeps them in fourth place in the Championship, five points ahead of Hibs who drop to seventh.
It is also perfect timing for caretaker player-manager James Fowler who boosted his chances of winning the job on a permanent basis, with Queens hoping to announce their new manager during the next week.