The 19-year-old student has apologised for his actions after being handed the ban following an International Rugby Board hearing during which he admitted using a pill called Pro-SD.
Chalmers tested positive for methandienone and stanozolol, which are both listed as anabolic androgenic steroids in the list of prohibited substances by the World Anti-Doping Authority, while on duty with the Scotland Under-20s squad ahead of a Test with Ireland back in May.
The match was a warm-up for the Junior World Cup in France and Chalmers did not play in the tournament, while he has also not featured in any of Melrose's three Scottish Premiership fixtures so far.
In a statement given to Press Association Sport, he said: "First of all I would like to apologise to my club Melrose RFC, my team-mates, the Scottish Rugby Union, my friends and my family.
"I am disappointed in myself and have to take personal responsibility for this incident which has ultimately led me to being banned from the game I have grown up with and love so much.
"I have been stupid, naive and impressionable and would urge other young players not to give in to the constant pressure to be bigger in the manner that I did over a two-week period in April last season.
"After my experience I would certainly encourage young players to seek out the correct advice from the right places before taking any kind of supplement or product.
"I hope over time I can be forgiven for my mistake and I can come back to compete in the game I love so much."
- Sports & Recreation
- International Rugby Board