In a statement to British media, Police Scotland said Hogg was released on the undertaking he would appear at Jedburgh Sheriff Court at a later date.
"I was lost, needed help, direction, time away from the spotlight to be able to take a deep breath and think," Hogg wrote in an Instagram post on Sunday.
"Spending time at a rehabilitation centre, allowed me to reset, learn about myself and talk about how I felt, without being judged. It’s not been easy but it was the right thing to do."
Hogg, Scotland's record try scorer with 27 tries, announced his retirement from rugby ahead of last year's World Cup, saying his body could not take the strain anymore.
He represented Scotland at two World Cups and captained them to two Calcutta Cup wins over England. He also won the European Champions Cup and Premiership in 2020 with club side Exeter Chiefs.
He was called up three times for British & Irish Lions tours in 2013, 2017 and 2021.