It is available to people on criminal charges, as well as those with civil, family or Waitangi Tribunal disputes that end up in court.
Wellington firm Rainey Collins had the highest bill, totalling $1,571,641, down from the $2,259,136 paid in the 2010-11 year.
Cooper Legal, also in Wellington, was paid $1,294,139, down from $1,489,644 last year.
Tamaki Legal in Auckland got $1,170,678 compared with $1,584,440 last year, and Aurere Law in Rotorua received $1,017,537 this year compared with $1,274,760.
Two firms in the top six put in bigger bills this year than in 2010-11.
The Law Store in Porirua was paid $1,031,741 - up from $685,544 last year.
And Auckland barrister David Martin Stone received $1,043,780, slightly more than the $1,017,105 he was paid last year.
The total legal aid bill is expected to fall next year as cost-cutting changes introduced earlier this year by Justice Minister Judith Collins take effect.
The changes halve payments for family and civil cases, and make it harder to get legal aid for less serious cases.
This week, Ms Collins said legal aid expenditure had risen 56 per cent between 2006-07 and 2009-10.
The Weekend Herald asked firms paid the most this year why their bills were so high, and whether they thought they gave value for money.
Sonja Cooper, from Cooper Legal, said her firm acted for more than 700 clients bringing historic abuse claims, mainly against the state.
"In the first half of this year, we settled just under 300 claims, mainly for legally aided clients. As a consequence of those settlements, Legal Aid Services received significant repayments of their expenditure for this client group."
Law Store principal lawyer Mary More said the firm's bill came to more than $1 million for several reasons.
"We have seven to eight solicitors," she said. "We serve the community from Wellington to Bulls; the majority of our clients come from a low socio-economic demographic.
"A percentage of this year's payments were from last year's invoices."
Legal aid payments
2011-12: $171,466,894, paid to 1455 firms and lawyers
2010-11: $169 million
The top six:
Rainey Collins, Wgtn: $1,571,641
Cooper Legal, Porirua: $1,294,139
Tamaki Legal, Auckland: $1,170,678
Aurere Law, Rotorua: $1,017,537
The Law Store, Porirua: $1,031,741
David M. Stone, Akld: $1,043,780
High profile case payouts
The list of legal aid payments made in 2011-12 has revealed what some of New Zealand's highest-profile lawyers reaped from the Government.
Greg King, who represented Ewen Macdonald at his trial for the murder of Feilding farmer Scott Guy, was paid $543,503 in the year to June 30.
Stuart Grieve, QC, lawyer for Brad Callaghan, who was jailed for murdering ex-partner Carmen Thomas, was paid $141,349.
Auckland lawyer Ron Mansfield received $942,050. His high-profile cases included "runaway millionaire" Leo Gao and Evans Mott, who escaped a conviction after admitting he helped his wife commit suicide.
Clayton Weatherston's lawyer, Judith Ablett Kerr, QC, had two payments for $175,296 and $95,762.
Mary-Anne Low, lawyer for the youth accused of murdering teenager Christie Marceau, was paid $242,471 and Guyon Foley, who represents several of Kim Dotcom's co-accused business partners, got $35,841.
Marie Dyhrberg, who defended the comedian convicted of sexually assaulting his 4-year-old daughter, was paid $608,545.
Barrister Barry Hart, who was struck off the legal register after he was found guilty of professional misconduct for "grossly overcharging" clients, was paid $52,237.
And lawyer Clint Rickards, an ex-police assistant commissioner who got his law degree after successfully fighting a charge that he raped Louise Nicholas when she was a teenager in the 1980s, put in a bill for $14,345.