The modern border dates from the period of the Raj when Britain controlled India, including what is now Pakistan. In 1899 the British, via its envoy to China Sir Claude MacDonald, proposed what became known as the MacDonald Line to the Chinese government, however the Chinese never responded to the proposal and thus the border was never formalised.

Over the following decades a variety of maps issued by all sides in the dispute, showing wildly varying boundaries. India and Pakistan inherited the dispute upon independence in 1947, further complicated by their dispute over ownership of Jammu and Kashmir. The issue came to the fore in the early 1960s, at a time of intense tension in the region due to ongoing failure to solve the Indo-Pakistani dispute over Kashmir, a much greater Chinese presence in Tibet, and the Sino-Indian War of 1962 in which China had seized control of the Indian-claimed Aksai Chin region. In 1961 China and Pakistan agreed in principle to demarcate their common border; negotiations commenced the following year, with the final Sino-Pakistan Agreement being signed in 1963. Both sides made concessions in the treaty, including Pakistani giving China the area known around the Shaksgam Valley known as the Trans-Karakoram Tract. Following the treaty a series of maps and aerial surveys of the border area were made and boundary pillars were installed.

The Khunjerab Pass is the only modern day border crossing between China and Pakistan, accessed via the Karakoram Highway. Historically the Mintaka Pass and Kilik Pass have also been used; however those crossings do not have vehicle access and are closed.