Mindfulness originated in the traditional Eastern philosophy of Hinduism in Ancient India where it has been practised for millennia as an essential component of spiritual and religious training that is cultivated through disciplined guidance and practice to understand the true nature of reality, being and/or consciousness, and the relationship between the two, among other truths.
It is evident from archival records that various methods of disciplined introspective and meditative practices were common custom for the different schools of Indian philosophy, taught in the form of recitations, and orally transferred in an unbroken line of transmission (i.e., Śruti or Sanskrit: श्रुति) across generations. These practices are now believed to have been around for thousands of years before they were formally compiled and documented in the Vedic scriptures. Documented evidence of some of these meditative practices in Vedic texts may be found in Rigveda (Sanskrit: ऋग्वेद), which is one of the four sacred canonical Vedic texts of Hinduism, from approximately around 3000 - 2500 BCE.
It should also be noted that the beginning of mindfulness is often misattributed to Buddhism. It is understood that Prince Siddhartha, influenced by Vedic teachings at the time, integrated elements of meditative practices into his Noble Truths. Some of the first recorded instructions on mindful practices in Buddhism appear in the texts of Satipaṭṭhāna Sutta around 20 BCE.
Western discovery of Vedic practices may be traced back to early 16th century when missionaries, intellectuals, and enthusiasts, who once lumped Vedic and Buddhist texts as “Oriental Philosophy”, decided to adapt and extol those practices as scientific, rational, and naturalistic. Interest in contemporary mindfulness, particularly in the West, has skyrocketed in the past two decades, by virtue of its salutary clinical outcomes and as a result of increased public discourse and acceptance. The mindfulness movement, pioneered by Jon Kabat-Zinn, has transformed the set of beliefs, practices, and traditions prevalent in India into a psychological technique and strategy that may be utilized to alleviate mental suffering and promote well-being. The therapeutic efficaciousness of mindfulness has yielded new interpretations and legitimacy for traditional Vedic practices which coupled with its scientific validation has elevated its profile to become the gold standard for psychotherapy.
Mindfulness, devoid of its traditional and spiritual Vedic roots, has now been commodified and repurposed into a magical panacea for all sorts of mental health ailments. You may read more about it here.