Scotch coffee was a term used in the British Royal Navy in days of yore to refer to fake coffee made from burnt bread crumbs. While exact recipes vary, it is basically whatever bread might be available (biscuit or hardtack, for example), crumbled, toasted until dark or well-burnt, and boiled in water. It was flavored to taste -- or depending on what was available -- most often with milk, sugar or molasses, and, one must assume, alcohol.
It appears to gain its name from the stereotype that Scottish people are tight-fisted, although it also appears to have been used in Scotland. Scotch coffee, as you may have deduced, was not a preferred beverage, and was drunk only when something more caffeinated was no longer available. It appears to have been most common in the mid- to late 1800s, with the earliest reference I can find occurring in 1844. However, it is probable that those using the term were not the most literate, and that fake coffee was not what anyone most wanted to write about, so the term may have arisen much earlier.
Scenes, Incidents, and Adventures in the Pacific Ocean by Thomas Jefferson Jacobs, 1844.
Proverbs, Proverbial Expressions, and Popular Rhymes of Scotland, collected by Andrew Cheviot, 1896.