The decision was taken by judge Valentyna Bozhko on December 31.
"A preventive measure in the form of detention in Kharkiv's penalty facility No. 27 for 60 days, until February 27, 2018, should be applicable to Volodymyr Bezukh. No bail is envisaged," she said.
The judge said no milder measures could be applicable to the suspect.
Bezukh said, in turn, he would appeal against the ruling, but added he saw no point in that.
The suspect did not admit his guilt and asked the court for house arrest.
Read alsoMan with explosives takes 11 hostages in KharkivUkrainian police on Saturday, December 30, freed the hostages being held in a post office by a man believed to be strapped with explosives, and arrested the hostage taker after an hours-long standoff in the city of Kharkiv, according to Reuters.
None of the hostages was harmed. A Reuters witness saw special force police in green camouflage rushing to the entrance of the post office, a yellow-and-white building at a road junction in the northeastern city near the Russian border.
In earlier statements, police said the man had entered the post office wearing a mask and taken 11 people hostage with the intention of robbing the place. Five of the hostages – three women and two children – were released early.
Regional police chief Oleg Bekh told reporters the man had a history of antisocial behavior and drug-related offences.
"He probably needs the help of a psychiatrist," Bekh said. "During the detention, he received minor injuries. He was not in a normal state ... the hostages said he was drinking alcohol."
Police were able to enter the building after one of the hostages opened the door for them, Kharkiv regional prosecutor Yuriy Danylchenko told reporters.
Police earlier said they had been in contact with the man via the telephones of the hostages, describing his manner as calm and not making any demands.
Anton Gerashchenko, an adviser to Interior Minister Arsen Avakov, said employees at the post office and customers had been among the hostages. One of them had managed to call the police from inside the building.
"The patrolmen came to the place of the robbery in a few minutes," Gerashchenko wrote on Facebook. "The robber realized that he could not now safely leave the crime scene with the loot and he decided to declare that he was taking everyone hostage."
One of the children released by the hostage taker told local media that the man had put explosives into two bottles and threatened to blow himself up if police did not listen to him. The man also said he had brain cancer, according to the child.
The man at one point voiced concern about the recent prisoner exchange between the Ukrainian authorities and pro-Russian separatists and thought more prisoners should have been released, police said.