In late T.A. 2941 Bilbo descended into the depths of the Lonely Mountain to look upon the Smaug and view his treasure. On his first visit he found Smaug asleep, but the second time the great dragon was awake and waiting for him. Bilbo though had taken the precaution of wearing his ring and was invisible so Smaug could not locate him precisely. However he could smell the hobbit and feel his air so he spoke to the intruder.
Smaug asked his visitor for his name. Knowing that it would be unwise to reveal his true name or stay quiet, Bilbo replied with a series of riddles, which no dragon can resist puzzling out. Bilbo gave himself a series of names such as "Ringwinner" and "Luckwearer", referring to his adventures on the way to the Mountain. Becoming pleased with his riddling, one of the names Bilbo conferred upon himself was 'Barrel-rider'.
This last epithet confirmed Smaug's belief that Bilbo's coming was a scheme of the Lake-men of Esgaroth. Of all Bilbo's names Smaug referred to the "thief" as Barrel-rider and Bilbo regretted making up that name, fearing that the Lake-men would suffer for it. The people of Esgaroth did lose their town to Smaug's flames when he attacked, but in the end Bilbo's use of "Barrel-rider" produced a fortunate reasult: At the height of the attack Smaug was killed by an arrow shot by Bard the bowman.