The Shaolin Monastery or Shaolin Temple (Chinese: 少林寺; pinyin: Shàolínsì), is a Chan Buddhist temple at Song Shan in Henan Province of what is now the People's Republic of China. The monastery was built by the Emperor Hsiao-Wen in AD 477, and the first abbot of Shaolin was Batuo, (also, Fotuo or Bhadra (the Chinese transposition of Buddha), an Indian dhyana master who came to China in AD 464 to spread Buddhist teachings. Long famous for its association with Chinese martial arts and particularly with Shaolin Kung Fu, it is the Mahayana Buddhist monastery perhaps best known to the Western world.

The Shaolin Monastery was built on the north side of Shaoshi, the western peak of Mount Song, one of the Sacred Mountains of China, by Emperor Xiaowen of the Northern Wei Dynasty. Yang Xuanzhi, in the Record of the Buddhist Monasteries of Luoyang (AD 547), and Li Xian, in the Ming Yitongzhi (AD 1461), concur with Daoxuan's location and attribution. The Jiaqing Chongxiu Yitongzhi (AD 1843) specifies that this monastery, located in the province of Henan, was built in the 20th year of the Tàihé era of the Northern Wei Dynasty, that is, the monastery was built in AD 497. Kangxi, the second Qing emperor, was a supporter of the Shaolin temple in Henan and he wrote the calligraphic inscription that, to this day, hangs over the main temple gate. Bodhidharma is said by the Shaolin monks to have introduced the sect of Chan (Zen) Buddhism to them at Shaolin Temple in Henan, China during the 6th century. Bodhidharma was also given the opportunity to teach what the monks called “18 Hands of the Lohan.” (non-combative healthful exercises)

Various styles of Kung Fu practiced even before the Xia dynasty (founded in 2205 BC), styles such as Jiao Di, the precursor of Shuai Jiao. Not to mention Shou Bo kung fu practiced during the Shang dynasty (2,000 years before the Shaolin Temple's construction), and Xiang Bo (similar to Sanda) from the 600s BC,[5] along with the hundreds of other systems of Chinese martial arts that have persisted from ancient times to the present day. There is a story that Huiguang and Sengchou were martial artists before the arrival of Bodhidharma, when they became two of the very first Shaolin monks.

Gung Fu was exported to Japan in the 18th and 19th centuries. Okinawan Shōrin-ryū karate (小林流), for example, has a name meaning "Small [Shao]lin". Other similarities can be seen in centuries-old Chinese and Japanese martial arts manuals. In 1928, the warlord Shi Yousan set fire to the monastery, burning it for over 40 days, destroying 90% of the buildings including many manuscripts of the temple library.

The Cultural Revolution launched in 1966 targeted religious orders including the Monastery. The five monks who were present at the Monastery when the Red Guard attacked were shackled and made to wear placards declaring the crimes charged against them. The monks were jailed after being flogged publicly and parading through the street as people threw rubbish at them. The government purged Buddhist materials from within the Monastery walls, leaving it barren for years.