Justice Rajiv Sahai Endlaw allowed the plea of Shekhar, who in 2008 had filed a paternity suit claiming Tiwari as his biological father.
The court's decision came after the senior Congress leader publicly accepted Shekhar as his biological son and his mother Ujjwala at a press conference in March.
The court, while passing the order, took into note the report of Tiwari's DNA test which was taken on the directions of the court earlier and proved that Shekhar was biologically linked to him.
It also accepted the newspaper clippings submitted by Shekhar's counsel Vedant Varma Monday where Tiwari accepted the 32-year-old man as his son.
Earlier, Tiwari had denied the claims and said the charges were part of a political conspiracy hatched against him by his opponents.