In May 1947, J. Mahajan was made a member of the Radcliffe Commission as the Indian National Congress Nominee. This commission was tasked with assigning territories between India and Pakistan, to give effect to the Partition. He is credited to have helped India in getting Gurdaspur, which was initially awarded to Pakistan. Gurdas puris considered a vantage point that enabled the building of road and rail linksto connect Jammu and Kashmir to the rest of India. After that, in September 1947, he served as the Prime Minister of Jammu and Kashmir. It is believed that Justice Mahajan convinced Maharaja Hari Singh to join the Union of India.
In October 1948, he was sworn in as the judge of Federal Court soon after being appointed as the third Chief Justice of India in 1954. Therefore, he devoted himself to the nation's service in three significant capacities - an exceptional lawyer, an eminent jurist, and an influential politician.