The new law is designed to cement use of Berber - alongside Arabic - by government administration, local authorities, public services, schools and in cultural life.
Berber, or Amazigh, was initially recognised as an official langauge in 2011, after a decades-long battle by activists.
The kingdom has struggled to cement the language's status, despite it being the mother tongue of a large part of the population.
The new law will "operationalise the official status of Amazigh ... preserving the language and protecting cultural heritage", said Culture Minister Mohamed Laaraj after the vote, which took place late on Monday.
But a prominent Berber activist and intellectual said the law does not go far enough.
"It is not what most Amazigh were waiting for - this law remains vague, it does not say that Amazigh must be taught or used by the media", Mohamed Assid told AFP.
"We demand a conceptual change for equality between the two official languages. But it is not the case - discrimination continues with this law", he lamented.
According to a 2004 census, eight million people - a quarter of Morocco's population - speak one of the three Berber dialects every day.
One of the most notable consequences of giving the language official status has been the appearance of the Berbers' tifinagh alphabet on public buildings, alongside Arabic and French.
Since 2010, a state TV channel, Tamazight TV, has been promoting Amazigh culture.
A few years ago, lawmakers caused a sensation by speaking Berber in parliament.
Moroccan administrators have sporadically refused to write Berber first names in civil registries.
The Amazigh flag - a red emblem set against thick yellow, blue and green horizontal stripes - has featured strongly in protests in Berber regions, including in the periodically restive northern Rif.