The amendment has to be approved by the president before it can go into effect.
The older version of article 301 bars insults to "Turkishness", a vague term used by many prosecutors to silence dissident voices.
After the reform, it will be a crime to insult the Turkish nation, rather than Turkishness, and the justice minister's permission will be required to open a case. The maximum sentence will be cut to two years from three.
"I am making this call for the last time: come back from the brink of making a mistake. Do not pave the way for insults to Turkish values"
Devlet Bahceli, head of the Nationalist Action Party
Writers and publishers say they will still face frequent trials as the changes are minor. Other laws restricting freedom of expression remain.
The European Union (EU) has said easing restrictions on free speech is a test of Turkey's commitment to political reform as Ankara looks to advance slow-moving membership talks which began in 2005.
On a recent trip to Turkey, Jose Manuel Barroso, the European Commission president, said it was a step in the right direction.
The opposition, objecting to what it sees as EU interference, wanted the law to remain unchanged.
Devlet Bahceli, who heads the Nationalist Action Party, said before the amendment was approved: "I am making this call for the last time: come back from the brink of making a mistake. Do not pave the way for insults to Turkish values."
Bahceli also called for a referendum to allow the people to decide "whether they want or don't want Turkish values and Turkey's honourable history to be insulted".
Some members of Bahceli's party, including Faruk Bal, party deputy chairman, said before the vote that some European countries, including France, Germany and the Netherlands, have similar laws.
But the government and ruling party members say those laws are rarely enforced.
Bekir Bozdag, a ruling party legislator, said: "There are similar laws in EU countries too. But if you compare the number of prosecutions there and in Turkey, the difference is as big as mountains."
Thousands of people have been prosecuted under Article 301 and its precursor since 2003. A total of 745 people were convicted under the article in that period.
Recep Tayyip Erdogan, Turkey's prime minister, has been criticised for the pace of change as advocated by the EU.
Critics say Erdogan, whose Islamic-oriented party is facing possible closure for allegedly violating secular principles, is now keen to be seen to be advancing Turkey's EU bid.
Opponents of Article 301 say the changes are cosmetic and will have little impact.