1044 GMT September 19, 2019
The 27-year-old, who has played for Britain in the Davis Cup, learned of the failed test earlier this week and said he had "let a lot of people down", BBC reported.
"I made a mistake and I must face up to it," said the world number 50.
A player can be banned for up to four years for an anti-doping violation, according to International Tennis Federation (ITF) rules.
The ITF said Evans provided the positive sample at the Barcelona Open on April 24 and he will be provisionally suspended from June 26.
"It's really important you know this was taken out of competition and in a context completely unrelated to tennis," said Evans, from Birmingham.
"I do not condone for one second to anyone that this is acceptable behavior.
"I have let a lot of people down - my family, my coach, my team, sponsors, British Tennis and my fans. I can only deeply apologize from the bottom of my heart.
"This has been a sad and humbling experience."
Evans last played on June 10 at Surbiton, retiring with a calf injury before withdrawing from events in Nottingham, London and Eastbourne.
He was ranked 772nd in the world in April 2015 but had reached a career-high ranking of 41 in March this year.
He lost all three of his matches last month, going out in the first round at the French Open, Madrid Open and Rome Masters.
The Lawn Tennis Association (LTA), the governing body of British tennis, said it was "very disappointed" by the news.
"We absolutely condemn any form of drug-taking and will support the process which needs to take place," said LTA performance director Simon Timson.
"We are in touch with Dan and we will offer appropriate guidance, support and education to him on how best to address the issues he now faces."
Evans has accepted the finding and the ITF said the ban will begin on Monday, "pending determination of the case".
A ban of two years is possible if it can be proved the substance was taken "in a context unrelated to sport performance", according to the Tennis Anti-Doping Program guidelines.
Spaniard Jose-Manuel Roman Gomez was given a four-year ban after testing positive for cocaine in 2015, while French world number 30 Richard Gasquet had a two-year ban overturned in 2009.
An ITF panel accepted Gasquet's claim that the substance was in his system after he kissed a woman who had taken cocaine in a nightclub.
Former world number one Martina Hingis was given a two-year ban in 2008 after testing positive for cocaine while competing at Wimbledon the previous year.