The home side were on top for the majority of the game but neither team could break the deadlock in a goalless first half.
El Arabi scored after 48, 59 and 77 minutes and Juanmi Jimenez's equaliser after the first only levelled matters up for four minutes before El Arabi handed his side the lead again.
As the game got underway Granada striker Diego Buonanotte put in a weak cross which Sergio Sanchez easily managed to clear.
But it was the visitors that had the first real chance to open the scoring as Francisco Portillo came close in the opening 10 minutes at Los Carmenes.
The 23-year-old midfielder was on target with a great shot for Los Boquerones after eight minutes but Granada goalkeeper Roberto Fernandez managed to get to the ball and made it safe.
And minutes later the ball was down at the other end of the pitch as the home side attempted to take the lead.
Yacine Brahimi put in a cross for Granada, but Argentina defender Marcos Angeleri was well-placed to block his effort and hold Lucas Alcaraz's side at bay.
The hosts started to dominate and El Arabi was next to test the Malaga defence as keeper Willy Caballero held on before Fran Rico came close to breaking the deadlock with a corner which was cleared by Jesus Duarte.
El Arabi had a great chance to put the hosts ahead as he collected the ball from Dimitri Foulquier and was in a good position to get on the scoresheet, but his shot failed to make it to the back of the net.
Malaga began to hit back and Fernando Tissone came close as the first half began to draw to a close. The 27-year-old midfielder was well-placed in front of the Granada goal but shot just wide of the right-hand post.
It did not take Los Carmenes long to get going after the break and El Arabi handed the home side the lead after 48 minutes.
The Morocco striker picked up the ball on the rebound after Willy's initial shot was kept out by Rico, but the visiting stopper failed to get in front of the second effort as El Arabi made no mistake.
Bernd Schuster's men went looking for an equaliser straight away and they got it seven minutes later.
Sergi Darder came close with a chance but Roberto held out his shot before Jimenez jumped onto the ball and fired home to make it 1-1.
But it was not long before the home side took the lead for the second time and El Arabi collected Brahimi's cross and was in a great position to score his fifth goal of the season.
And Granada were not finished yet as Brahimi was again the provider as he set up El Arabi for his hat-trick and the 26-year-old slotted home to the delight of the home fans.
The home side continued to push forward but Willy managed to hold them to three.