The punishment was announced after an internal disciplinary investigation by the Scottish Rugby Union.
The 29-year-old was initially stood down from club and country in mid-October for what was widely reported to be cocaine use and the ban handed down will run from the original suspension, meaning he will be available to return for Edinburgh in the middle of January.
The punishment was described as “part of a range of sanctions” against the player.
Hardie said: “I would like to apologise to everyone for putting myself in this situation.
“Through my actions I feel I have let my club, my team-mates and the fans down. I want to acknowledge the support I have had from Edinburgh Rugby and Scottish Rugby in dealing with the issue.
“I am now focused on putting myself in the best possible position to be considered for selection again.”
• READ MORE - Shock ban for Scotland flanker John Hardie as Autumn Tests loomAn Edinburgh Rugby spokesperson added: “John has co-operated with the disciplinary process throughout.
“He has acknowledged the serious mistake he has made as a professional athlete and has accepted full responsibility for his conduct.
“It has been made clear that we are not prepared to tolerate the behaviour which caused this situation.
“Support will be provided to the player by Edinburgh Rugby and Scottish Rugby on a personal and professional level throughout the period of his suspension and going forward.”
New Zealand-born Hardie, who qualifies for Scotland through his grandmother, arrived in Scotland as a free agent in the summer of 2015 after leaving Otago Highlanders. He won the first of his 16 caps in a World Cup warm-up match against Italy in Turin in the August of that year.
Then national coach Vern Cotter picked the openside for his World Cup squad and Hardie was a star performer for the Scots at the tournament in England. At its conclusion it was announced that the player would be joining Edinburgh. After signing a one-year extension in May his contract will be up at the end of this season.
The three-month suspension gives Hardie, who missed the recent successful autumn series and won his last Scotland cap in the loss to Fiji at the end of the summer tour, a chance to rebuild his career.
Even before his October suspension he had been supplanted as the No 1 openside flanker for both Edinburgh and Scotland by Hamish Watson, although it is understood that Hardie will be available for selection for the national team again if he is playing regularly and well for Edinburgh upon his return.
Scotland coach Gregor Townsend will name his Six Nations squad in late January, ahead of the opening match away to Wales on 3 February.