Several of his brothers were in British Indian services and one of them, Sir Henry Lawrence, became president of the Board of Commissioners constituted for the settlement of the Punjab after its annexation in 1849. The three-member Board included John Lawrence as well. Later the two brothers quarreled on the issue of the best mode of the Punjab settlement and the Dalhousie administration asked the elder brother, Henry Lawrence, to resign. John Lawrence then assumed responsibility for the Punjab settlement, which he achieved with great credit. He retired from the Indian Civil Service in 1859. After the death of Lord Elgin in 1863, Sir John Lawrence was appointed Governor General of India, a position he held from 12 January 1864 to 12 January 1869. He came to India in 1829 along with his brother, Sir Henry Montgomery Lawrence. He soon became a magistrate and tax collector in Delhi, where he was known for his concern for the plight of the peasantry.
Unlike the previous regimes Lord Lawrence's administration is characterized by non-interference in Afghan politics. He dealt with the Bhutan war and the Orissa Famine masterfully. Instead of undertaking foreign adventures like his predecessors Lawrence paid particular attention to health and sanitation, irrigation, and development of railways and local self-government. In fact, one of his earliest measures was the enactment of the Municipal Act, 1864, which inaugurated the system of representative local government in Bengal. After his retirement, Lawrence was made Baron Lawrence of the Punjab. During the the First Sikh War of 1845 to 1846, Lawrence organized the supplying of the British army in the Punjab and became Commissioner of the Jullundur district, serving under his brother, the Governor of the province. In that role his was known for his administrative reforms, for subduing the hill tribes, and for his attempts to end the custom of sati.
In 1849, following the Second Sikh War, he became a member of the Punjab Board of Administration under his brother, and was responsible for numerous reforms of the province, including the abolition of internal duties, establishment of a common currency and postal system, and encouraged the development of Punjabi infrastructure, earning him the sobriquet of "the Saviour of the Punjab". In this work his efforts to limit the power of local elites brought him into conflict with his brother, and ultimately led to the abolition of the Administrative Board, instead becoming chief commissioner in the executive branch of the province. In that role, Lawrence was partly responsible for preventing the spread of the Mutiny to Punjab in 1857, and negotiated a treaty with the Afghan ruler Dost Mohammed Khan, and later led the troops which recaptured Delhi from the rebellious sepoys. For this, he was created a baronet and received an annual pension from the East India Company of £2,000.
He returned to England in 1859, but was sent back to India in 1863 to become Viceroy to succeed Lord Elgin, who had unexpectedly died. As Viceroy, Lawrence pursued a cautious policy, avoiding entanglement in Afghanistan and the Persian Gulf. In domestic affairs, he increased educational opportunities for Indians, but at the same time limited the use of native Indians in high civil service posts. He was raised to the peerage as Baron Lawrence, of the Punjab and of Grately in the County of Southampton, on his return to England in 1869, and died ten years later. A boarding house at the East India Company College (today Haileybury and Imperial Service College) and a "house" at Foyle College was subsequently named after him.
He became Chairman of the London School Board (1870-73), and Chairman of the Committee formed to oppose the policy of the Afghan war of 1878-79.