More than 100 guests including French former culture minister Jack Lang and fashion designer Paloma Picasso joined the private ceremony at the garden where bulbul birds sang in the trees and sunlight bounced off pools of cool water.
Saint Laurent and long-time companion Pierre Berge bought the Majorelle Garden in 1980 and gave a new lease of life to its cobalt blue walls and lily pools standing among cacti, bamboo, palms and agave.
Today its quiet pathways and small museum of Islamic art are popular with tourists dazed from visiting the city's narrow, dusty streets crowded with donkey carts and beeping mopeds.
"I am very happy that he chose Marrakesh, this magical place, to rest for eternity," Lang said.
Saint Laurent was credited with changing forever what women wore and was the first designer to make luxury labels accessible to a wider audience through innovative read-to-wear collections.