Fundamentally, deteriorating relations between North Vietnam and China was driven by the Sino-Soviet Split and Sino-Vietnamese disagreements over the direction of the war.
As you point out, the People’s Republic of China (PRC) did play an important role in aiding North Vietnam from 1949 onward. According to Chen Jian, the PRC neither hindered nor encouraged the Communist Party of Vietnam’s (CPV) desire to reunite Vietnam by military means up until 1962. Increased support to North Vietnam only occurred after Mao and the PRC’s political leadership grew fearful of American military involvement in Vietnam. An additional consideration was the Sino-Soviet Split. A major critique of the Soviet Union by Chinese demagogues was its failure to support revolutionary movements under Khrushchev's ‘Peaceful Coexistence.’ China could not afford to be hypocritical in its search for Communist allies, and therefore grew increasingly supportive of a military solution to the Vietnamese problem. Conversely, the North Vietnamese were disillusioned by the lack of Soviet support and edged closer to the PRC. Staff talks were held in 1963 and 1964 to discuss joint action if American forces crossed the 17th Parallel (the Demilitarised Zone between South and North Vietnam), while aid packages were increased. Upon being notified of the Gulf of Tonkin Incident, Mao delivered one of his many Maoisms:
If the United States attacks the North, they will have to remember that the Chinese also have legs, and legs are used for walking.
With a Sino-Vietnamese agreement in 1965 that China’s main role would be to provide logistical support and defend the North while Vietnamese forces would take the war to the south, Chinese war materiel and volunteers began to stream into North Vietnam. Chinese support for North Vietnam consisted of three concrete measures: the dispatch of Chinese engineering troops to improve North Vietnamese infrastructure; the use of Chinese anti-aircraft units to defend North Vietnamese strategic locations; and the supply of both civilian and military materiel. In total, Chinese war materiel to North Vietnam was valued at two hundred fifty million US dollars, while twenty-four million tons of food was shipped across the border. The Chinese People’s Liberation Army (PLA) committed 300,000 troops to North Vietnam from 1965 to 1968.
However, there were tensions from the very start. China had always believed North Vietnam to be her ‘brother and comrade’ against Soviet revisionism, but events soon proved that the CPV leadership were more pragmatic than revolutionary. With the ousting of Khrushchev in 1964, the USSR began actively recruiting allies against China. North Vietnam was seen as a major battleground in the fight for communist world leadership. Not to be outdone by Chinese support, the USSR offered her own aid packages. North Vietnamese polemics against ‘Soviet Revisionism’ quickly disappeared, and by 1966, Le Duan (General Secretary of the CPV) could call the USSR his ‘second motherland,’ which greatly irked Mao. Sino-Soviet rivalry over Vietnam led China to reject Soviet proposals for a united transport system to facilitate the movement of aid through Chinese territory to Vietnam. Transport of materiel by railway was only approved after extensive discussions, while Soviet use of Chinese airfields were dismissed as out of hand. Disputes over transport capacity and deliberate Chinese hindrance continued throughout the war. The CPV was understandably not amused by Chinese obstruction.
Conflict also occurred over military strategy, an issue fundamentally linked with Sino-Soviet tensions. Unlike the First Indochina War (1950-1954), where Chinese advisers took a leading role in directing military operations (Dien Bien Phu was proposed and planned by Chinese military advisers), the CPV refused Chinese interference in their decision-making. Vietnamese leaders increasingly relied on Soviet advice in shifting from a defensive guerrilla war strategy to an offensive set-piece battle strategy. This in turn led to a greater need for Soviet heavy military equipment which China could not provide. This was regarded with alarm by Chinese strategists. Defence Minister Lin Biao’s speech “Long Live the Victory of People’s War” published on 3 September 1965 was an implicit critique of Vietnamese reliance on materiel (interestingly, Lin Biao had himself defied Mao’s advice to conduct guerrilla warfare in Manchuria during the Chinese Civil War). The Chinese were aghast at the CPV’s decision to launch the Tet Offensive in January 1968, which was perceived to be both a tactical and strategic failure in Chinese military circles.
Most significantly, China and North Vietnam diverged over the question of peace talks. Hanoi saw peace talks as an option on the table; China, in a particularly jingoistic mood following the start of the Cultural Revolution, viewed any negotiation to be a capitulation to American imperialism. When Le Duan visited Beijing in 1968, Chinese leaders repeatedly told him that ‘‘what could not be achieved on the battlefield would not be achieved at the negotiation table.’’ Mao was shocked when the CPV did not inform Chinese of the start of the Paris Peace Talks, and the blanket ban on its mention was enforced in Chinese media for nine months. Disapproval of the Talks led to the withdrawal of Chinese volunteers from Vietnam - by 1970, all troops were withdrawn. Chinese aid had reached a peak in 1968, but dropped drastically in 1969 and 1970. At the same time, Soviet aid was increasing at a rapid pace.
By 1973, Sino-Vietnamese relations were in freefall. The Sino-American rapprochement was seen as the ultimate betrayal by the Vietnamese, especially since America had initiated an extensive bombing campaign of North Vietnam (Operation Linebacker) in the same year of 1972. China became increasingly apprehensive of a Soviet-Vietnamese alliance against China. “Regional hegemonism” (as in relation to the USSR's "global hegemonism") became the new Chinese buzz word to describe Vietnamese actions. The 2nd May 1975 edition of the Beijing Review congratulated the CPV for the successful reunification of Vietnam, but at the same time proclaimed that "Indochina Belongs to the Indochinese Peoples," an implicit warning to Vietnam not to expand her influence to Chinese-backed Laos or Cambodia. In the post-war period of 1975-1978, disputes over the Spratly Islands, border skirmishes, the expulsion of ethnic Chinese from Vietnam, the Soviet-Vietnamese Friendship Treaty, and the Vietnamese invasion of Cambodia saw Vietnam and China enter a fully antagonistic relationship. It was not a surprise to informed foreign observers when the Sino-Vietnamese War kicked off in 1979.
Sources:
Liaison Department, Political Department, Kunming Military Region, Yunnan Institute of Southeast Asian Studies. Xiandai ZhongYue guanxishi ziliao xuanbian [Selected Materials on the History of Modern Sino-Vietnamese Relations], vol. 4. Kunming: Yunnan Dongnanya yanjiusuo, 1984.
Qiang, Zhai, China and the Vietnam Wars, 1950-1975. Chapel Hill: University of North Carolina Press, 2000.
Chen, Jian. “China and the First Indo-China War, 1950-54.” The China Quarterly 133 (1993): 85-110.
Womack, Brantly. China and Vietnam: The Politics of Asymmetry. Cambridge: Cambridge University Press, 2006.
Chen, Jian. Mao's China and the Cold War. Chapel Hill: University of North Carolina Press, 2001.
Khoo, Nicholas. Collateral Damage: Sino-Soviet Rivalry and the Termination of the Sino-Vietnamese Alliance. New York: Columbia University Press, 2011.
Huynh, Luu Doan. “The Paris Agreement of 1973 and Vietnam’s vision of the Future.” in The Third Indochina War: Conflict Between China, Vietnam and Cambodia, 1972-79, ed. Odd Arne Westad and Sophie Quinn-Judge, 87-102. London: Routledge, 2006.