After Mahrez missed a good early chance, Bournemouth opened the scoring in the game with 35 minutes gone as Josh King dusted himself down to convert from the spot after being brought down by Marc Albrighton.
However, Leicester fought back in the second half, dominating the game and having the best of the chances.
Young defender Ben Chilwell was denied by a fine Steve Cook block, whilst Kelechi Iheanacho somehow missed the target from three yards after Harry Maguire saw a shot blocked.
It looked as if it wouldn't be Leicester's day but a moment of magic from Mahrez in added time earned them a share of the spoils.
The Algerian stepped up and curled a free-kick from range into the bottom corner with the minimum of fuss to ensure the game finished 1-1.
Leicester remain in eighth but are now without a league win since mid-January, whilst Bournemouth sit 11th.