"Kafr Ra'i" translates as "Village of the Shepherd" in Arabic.
Pottery remains from the Byzantine, early Muslim and the Middle Ages have been found here.
In 1265, after the Mamluks had defeated the Crusaders, Kafr Ra'i was mentioned among the estates which Sultan Baibars granted his followers. The village was divided equally between two of his emirs: Shuja' al-Din Tughril al-Shibli and Ala' al-Din Kundughdi al-Hubaishi.
The village was incorporated into the Ottoman Empire with the rest of Palestine in 1517. In the 1596 Ottoman tax records, it appeared under the name of Kafr Ra'i, located in the NahiyaQaqun, in the Nablus Sanjak. It had a population of 35 families, all Muslim. They paid a fixed tax-rate of 33.3% on agricultural products, including wheat, barley, summer crops, olive trees, goats and beehives, in addition to occasional revenues and a press for olive oil or grape syrup; a total of 7,914 akçe.
In 1838, it was noted as a Muslim village, Kefr Ra'y, located in the esh-Sha'rawiyeh esh-Shurkiyeh District.
In the 1945 statistics, the population was 2,150, all Muslims, with 35,868 dunams of land, according to an official land and population survey. Of the village's lands, 3,254 dunams were used for plantations and irrigable land, 6,254 dunams for cereals, while 36 dunams were built-up (urban) areas.
On 2 February 1989, during the First Intifada, Israeli soldiers had been clashing with Palestinians in the nearby village of Fahma and when four teenagers from Kafr Ra'i approached the village, Israeli soldiers sped and shot towards them in their vehicle. As the boys fled, one of them, 14-year-old Salameh Tahsin Sobeih, was shot and fell down. Witnesses reported that some ten soldiers proceeded to kick Salameh and drag him to their vehicle. A Palestinian doctor asked to see Salameh, but was denied. Members of Kafr Ra'i's village council found Salameh's body with three gunshot wounds and bruises, a bloodied mouth and broken nose, at the local military headquarters, where soldiers told them he was being interrogated. A funeral was held for Salameh the following day in Kafr Ra'i, with attendees also coming from Arraba and Fahma.
In the 1997 census by the Palestinian Central Bureau of Statistics (PCBS), Kafr Ra'i had a population of 5,824. Palestinian refugees accounted for 27.6% of the inhabitants. In the 2007 PCBS census, the population grew to 7,364, living in 1,395 households with each household containing an average of between five and six members. The number of housing units was 1,559. The gender ratio was 49.7% female and 50.3% male.