Roderick MacFarquhar, a consummate scholar of Communist China whose writing on Mao’s power politics influenced how people around the world understood China, died on Sunday in Cambridge, Mass., where he had long taught at Harvard University. He was 88.

His son, Rory, said the cause was heart failure.

Professor MacFarquhar specialized in the origins of the Cultural Revolution, the decade of turmoil that terrorized China beginning in 1966. His three-volume work, “The Origins of the Cultural Revolution,” came to be considered a classic.

The research for those books, which were based on dense official texts, public speeches and Mao’s own words, opened a world hidden to the West and illuminated an era of China’s past that still seems almost unfathomable.

At Harvard, Professor MacFarquhar taught history and political science and was known for his wit and informality. In one class he asked his teaching assistants to pose as Red Guards, Mao’s paramilitary youth, and act out boisterous self-criticism sessions. He then coaxed the class to shout over and over, “Mao Zedong, Wan Sui!” — “10,000 years for Mao!” — so that everyone felt the fervor of the movement that shook China. The “CultRev” class packed the biggest lecture hall on campus.