Sister Gertrud Tiefenbacher, from the Sacred Heart Home Convent in the village of Ixopo, southwest of Durban, was murdered last month.
In a statement read in court, Sibongiseni Phungula, 25, said he and his co-accused, Mondli Shozi, 26, had gone to the convent to look for food after a night of drinking.
They were interrupted by Tiefenbacher, who shouted at them, the News 24 agency reported from Pietermaritzburg High Court.
Shozi said he then grabbed her, dragging her to her room and tied her up.
"I then removed her panties and had sexual intercourse with her," said Phungula, adding the elderly nun was "still moving" when he left her in her bed.
Tiefenbacher's body was discovered the following day. Her hands were tied with an electric typewriter cord and a wet towel was over her face.
"I wish I could undo what I have done," Phungula said in his statement.
The two men admitted to stealing a vacuum cleaner, groceries and a watch before fleeing.
They said they had met earlier in a pub where they drank a bottle of brandy and another bottle of spirits before setting off to the convent.
The trial was attended by nuns from the convent.
Tiefenbacher moved to South Africa 50 years ago to work for the Roman Catholic Church.