Muhammad Rizalman, 38, made a brief appearance in front of Justice of the Peace Hewitt Humphrey in the Wellington District Court.
He has been accused of burglary and assault with intent to rape Tania Billingsley at her Wellington home on May 9.
Following Rizalman's arrest on May 10, New Zealand asked Malaysia to waive diplomatic immunity but on May 22 he left the country after a mix-up between officials.
After a successful extradition process, Rizalman arrived in Auckland overnight and flew to Wellington this morning where he travelled directly to the District Court.
He stood quietly in the dock during the proceedings that lasted only a few moments.
Mr Humphrey remanded Rizalman in custody and cancelled an arrest warrant that had been issued on May 30.
A tidy-looking Rizalman was wearing a brown leather jacket with a blue striped shirt.
People, believed to be from the Malaysian High Commission, were in the public gallery.
There was a large media presence at court today and before Rizalman's hearing, Mr Humphrey heard arguments regarding media applications to film, take photos and record the proceedings.
Rizalman's lawyer Donald Stevens QC opposed the applications.
He said they would damage his client's right to a fair trial.
Rizalman had only arrived in the country about midnight and would be jet lagged and tired. Any photos and footage that showed his client in not the best light could be used in future reports, Dr Stevens said.
He also argued media had filed their applications at a late stage and there had not been enough time to consider them properly.
Prosecution for police Grant Burston said photos taken today could impact on a fair trial and suggested the matter be adjourned until Tuesday at Rizalman's appearance in front of a judge.
Mr Humphrey said a submission by Ms Billingsley said she did not oppose media applications.
He granted photos, footage and recordings of the proceedings, but not of the defendant.
The images were not allowed to be posted on social media websites, he said.
The ruling was for today's hearing only.
The Malaysian Foreign Affairs Ministry said Rizalman was accompanied to the country by two New Zealand police officers and two Malaysian armed forces personnel.
Malaysian newspaper The Star reported Rizalman was escorted onto an aircraft in Kuala Lumpur without handcuffs and had reportedly expressed his wish to voluntarily return to New Zealand.
Rizalman was a former defence staff assistant at the High Commission of Malaysia.
At the end of June the case was made public and an inquiry began over how the diplomat was allowed to leave.
Malaysia confirmed on July 2 that Rizalman would be returned to New Zealand after psychiatric assessments.
The Star reported he was discharged from the Tuanku Mizan Military Hospital at the end of July.
- by Rebecca Quilliam