Most likely you have heard the phrase “the whole shebang” before. Something like. “Wow, he made a mess of the whole shebang.” That use, meaning “a matter of concern” comes to us around 1869.
The first recorded use of shebang was in 1861. It referred to a small lean-to or shelter in a prisoner of war camp. For the most part during the Civil War prisoners were kept in enclosed spaces where they had to fend for themselves. Often they would dig a trench and use whatever the could to cover it. This became their home for the duration.
Where did shebang come from? There are two possibilities. It could have come from Louisiana Confederates. Where it derived from the word chabane which means covered hut, lodge or cabin in French. It could have also come from the Irish word shebeen, a cabin where unlicensed liquor is sold and drunk. Either one sounds plausible. Based on the number of Irish that served in both armies during the war I would tend to lean towards the latter.
It would be my best guess that since everything a prisoner owned was kept in his shebang, after the war it became used in the form we know today. Especially if used to mean the entirety of something. “They took care of the whole shebang.” “They left the entire shebang behind.’ Conjecture? Sure but gosh darn it sure does quack like a duck!