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.