1866, echoic of a working steam engine. As a verb, from 1884. Related: Chugged; chugging. Drinking sense attested by 1940s (chug-a-lug), probably imitative of the sound of swallowing.
To drink very quickly and in volume, as alcohol: chugged six milks at lunch
To move along, esp slowly and laboriously: The USS Saratoga came chugging up the Delaware
[1900+; echoic of an engine, esp a steam engine, operating]