Labour, Plaid Cymru and the Liberal Democrats opposed new thresholds on when strikes can take place.
The vote against Conservative ministers' Trade Union Bill is not legally binding.
The UK and Welsh governments disagree over whether the assembly's permission is needed before the new rules apply to public sector workers in Wales.
The bill would require at least half of union members to take part in a ballot before a strike can happen.
In public services such as health, education and the fire service, industrial action would need at least 40% of eligible union members to vote in favour.
The Conservatives say the bill should apply to the whole of Britain, but Welsh government ministers say the assembly's consent is needed.
On Tuesday, AMs withheld their approval of the bill by voting down a motion in the Senedd chamber.
Labour has said it will try to overturn the bill if the UK government ignores the assembly' vote and pushes ahead.
If returned to power at May's assembly election, Labour would introduce its own legislation to repeal the bill.
Public Services Minister Leighton Andrews said: "In Wales we have a good record of resolving disputes.
"There was no junior doctors' strike in Wales, there was in England.
"Fire fighters took industrial action in England over pensions, they were not doing so in Wales.
"In contrast, we believe this bill, the Trade Union Bill, will lead to a confrontational relationship between employers and the workforce."
Welsh Conservative leader Andrew RT Davies said he supported the role of trade unions in standing up for members.
But, referring to the general secretary of the Unite union, he said: "Where I will not stand up and support is for Len McCluskey, or his mob, to use you lot [Labour AMs] to live their ambitions."
He added: "Where there is a discrepancy I would suggest is where general secretaries of unions choose to live their political dreams on the back of their members' subs, and that clearly is not acceptable."
Assembly members have voted against UK government proposals to restrict strike ballots in the public sector.