Brenton Tarrant, 29, also admitted the attempted murder of another 40 people, and one terrorism charge.
He had previously denied the charges and was due to go on trial in June.
The gun attacks at two mosques sent shockwaves around the world. In the wake of the killings, New Zealand brought in stricter gun laws.
New Zealand is in a state of lockdown due to the coronavirus outbreak and the plea was made at a scaled-down court hearing in Christchurch High Court on Thursday.
No members of the public were allowed in to the hearing and Tarrant, from New South Wales, Australia, and his lawyers appeared via video link.
A representative of the two mosques that were attacked was allowed to attend the hearing to represent the victims and their families.