Use of hemp as a resource for its fibers and so on has been going on since the stone age, but the earliest evidence of its use for its psychoactive properties, at least which I've ever read about, dates from the third millenium BCE (3000–2001 BCE) . A ritual brazier found in a Romanian burial site by archaeologists contained charred remnants of cannabis seeds, per Lost Civilizations of the Stone Age by Richard Rudgley.
Cannabis was grown by pretty much every group of people in contact with it for many uses.
But it seems like you're interested in the psychoactive effects. Yes, cannabis was consumed for thousands of years for its effects. It was used in cultural/religious ceremonies.
I found this:
In 2003, a leather basket filled with cannabis leaf fragments and seeds was found next to a 2,500- to 2,800-year-old mummified shaman in the northwestern Xinjiang Uygur Autonomous Region of China. Evidence of cannabis consumption was also found in Egyptian mummies dated about 950 BC.
Also, it was used in Hindu ceremonies. Cannabis was also used by the ancient Hindus of India and Nepal thousands of years ago. The herb is called ganja or ganjika in Sanskrit and other modern Indo-Aryan languages. Some scholars suggest that the ancient drug soma, mentioned in the Vedas, was cannabis, although this theory is disputed
So it's been used by a lot of cultures. I also remember it was used by the Parthians in Iran for religious ceremonies.
I also have a book on Sufism ( an Islamic mysticism school of thought). There are medieval depictions of Sufis smoking from hash pipes.
So to answer your question, it was probably first used by the early Hindus since that's the area where the plant originates.
Canabis and Opium were found in a Scythian grave from 2,400 years ago.