The youth was arrested in Nilphamari on Wednesday, three days after the Willes Little Flower School student died at Dhaka Medical College Hospital from her wounds.
He was brought to Dhaka the same day and produced before the court of Metropolitan Magistrate Delwar Hossain on Thursday.
Police sought 10 days to quiz Obayed in custody, but the judge granted six days, court police's Sub-Inspector Mizanur Rahman told bdnews24.com.
Public Prosecutor Abdullah Abu said the accused did not make any plea during the hearing. No lawyer represented him in court either.
Her family claimed Obayed, who worked at a tailoring shop in the city, had been ‘harassing’ Risha over phone for some months.
The case started by the family accuses Obayed of stabbing her.
Willes Little Flower School and College students have been demonstrating by blocking the Kakrail intersection for past few days demanding justice for Risha.
Students of other educational institutions had expressed solidarity with them and even joined their protests.