The macaque silvanus (Barbary Ape, though it's a monkey not an ape) inhabits the cedar forests of Morocco. Cedar trees typically only grow at over 1600-1700m, so you find them and their monkeys in the Middle Atlas, Rif and High Atlas.
You can view a YouTube video (http://www.youtube.com/watch?v=fPhzzDUIZds) showing the monkeys and their babies enjoying melons! Choose HD for the best quality playback.
Azrou is a good place to view the macaques, with three spots that are normally more or less guaranteed to provide a sighting.
Spots 1 and 2: from Azrou (1450m) head south on the N13 to Midelt. As you leave town you pass an Afriquia fuel station on your right and ascend through a Holm Oak (evergreen oak) forest. 6-7km after the Afriquia you start to see the first of the cedars. Spot 1 is the crossroads with rock and fossil sellers on the left. If there's none here, or if you are coming from the south, the second spot is right at the southern edge of the cedar forest before open countryside.
Spot 3: head east out of Azrou on the N8 towards Ifrane. After 3-4km you'll pass a remarkably ornate set of buildings on the right. 900m further on take a road to the right which is probably signposted Cedar Gourand. Carry on for 4km, the last couple of hundred metres are gravel and park up by the big dead cedar tree.
You can see the placements on this map: http://www.infar.co.uk/tim/azrou-monkeys.jpg
I've also included a waypoint marking Mischlifen, a winter ski resort set in the caldera of an extinct volcano. A nice round trip from Azrou is to take the N13 south past monkey spots 1 and 2, then take the P7231 to Mischlifen. Take a small road to the right to descend into the caldera. Afterwards continue on and return via Ifrane. As you exit Ifrane for Azrou, take the road to the left by the side of the Shell station signposted Ras El Ma (marked in orange on the map), for a scenic ride back through the forest.
Unless you are driving a 4WD vehicle, don't take any of the inviting-looking shortcut roads marked in white as these are pistes (tracks). The ones I've marked in orange are tarmac so OK for ordinary cars.