Confederate railroads in the American Civil War

The American Civil War was the first in which large armies depended heavily on railroads to bring supplies. For the Confederate States Army, the system was fragile and was designed for short hauls of cotton to the nearest river or ocean port. During the war, new parts were hard to obtain, and the system deteriorated from overuse, lack of maintenance, and systematic destruction by Union raiders.
The outbreak of war had a depressing effect on the economic fortunes of the Confederate railroad industry. With the cotton crop being hoarded under the "King Cotton" theory, railroads lost their main source of income. Many were forced to lay off employees, and in particular, let go skilled technicians and engineers. Due to a general opinion that the war would not last long, initially Confederate rail operators did not seek, nor build, alternative sources of iron for rail construction and repair.
Although railroad contracts to port towns had ceased, due to the combined effects of the cotton export policy and the Union naval blockade, lucrative government contracts were doled out to rail operators with lines supplying men and arms to the front line of Tennessee and Virginia. A consortium of rail operators had decided upon a universal rate for government contracts; "a uniform rate of two cents a mile for men and half the regular local rate for munitions, provisions, and material, and also agreed to accept Confederate bonds at par in payment of government transportation."
In addition, the Confederacy suffered from two key deficiencies in its rail network. First was the route structure: it was built to serve the coastal shipping industry, and most rail lines connected ports and river terminals to points inland. This lack of inter-railway connections made many railroads useless once the Union blockade was in place. Second was break of gauge; much of the Confederate rail network was in the broad gauge format, but much of North Carolina and Virginia had lines. Sometimes, as with Montgomery, Alabama, a city was served by two railroads with different gauge and different depots, meaning that through cargo had to be unloaded from one railroad and moved by animal-powered transportation to the other company's station, where it would be re-loaded. Southern railroads west of the Mississippi were isolated, disconnected, and differed widely in gauge. Several of the Northern railroads, in contrast, were complex networks in themselves, and many cities were served by more than one. The fact that most used the same gauge made transfer even easier.
History.
1861.
As troop movement began in earnest in May and June 1861, a crippling problem was discovered; many rail lines terminated in towns without connecting to continuing lines. Instead, cargo would have to be unloaded, driven across town, and then reloaded. Soldiers and other passengers would often have to stay overnight to catch a continuing train the next day. When the Confederate government attempted to rectify this problem, they ran into local opposition. Towns preferred the lack of connection which, under the principle of the negative railroad, required the hiring of teamsters and hotel rooms. Railroad operators, while not opposed to connecting lines, were opposed to the possibility of sharing rolling stock with rival companies.
Confederate raids on the Union's most relevant railroad company, the B & O, devastated tracks and rolling stock; the line quit running. However, the North had enough industrial resources to restore operations.
1862.
As 1862 opened, the Confederacy built a spur off the Orange and Alexandria Railroad at Manassas Junction toward Centreville, Virginia, known as the Centreville Military Railroad. It served to supply the Confederate defenses on the Centreville Plateau along the north side of the Bull Run feed into the Occoquan River.
As the war waged on, attempts were made by railroad operators to acquire railroad supplies abroad, necessitated by the Confederacy's small industrial base. The problem of supplies had become increasingly acute, especially with respect to the already small supply of engines and cars. Stressed by overuse, lacking material to make repairs, and the conscription of men who could make them, rail operators were predicting a breaking point as early as 1862. While railroad operators attempted, throughout the war, to get assistance from the Confederate Congress, the response was either indifferent or hostile.
1863.
In mid-1863 the Confederate government finally initiated an overall policy concerning railroads, and even then it was confined solely to aiding the war effort rather than shoring up the weakening economy of the Confederate States of America. New legislation allowed commandeering (under the name of "impressment"), which brought railroads and their rolling stock under the de facto control of the military. Meanwhile, Union victory in the Chattanooga Campaign gave the United States Military Railroad full control of the Nashville and Chattanooga Railroad which after repairs supplied the Atlanta Campaign.
1864.
In March 1864, the Confederate Quartermaster-General's Department ordered all passenger trains to give governmental trains the right of way. By mid-1864, all passenger service in the Confederacy had come to a standstill. Transport of goods for civilian use was also affected, exacerbating shortages brought on by wartime devastation, speculation, hoarding, and the Confederacy's impressment policy.
In the last year before the end of the war, the Confederate railroad system was always on the verge of collapse. The impressment policy of quartermasters ran the rails ragged. Feeder lines would be scrapped for replacement steel for trunk lines, and the continual use of rolling stock wore them down faster than they could be replaced.
Union use.
As the Union armies pushed further into Confederate territory, they came into possession of former Confederate railway lines, or what was left of them. Confederate troops generally applied a scorched-earth policy towards railroads when they were in retreat. Union troops would often have to rebuild an entire line from scratch for it to be usable. Late in 1862, when Confederate forces devastated the Mississippi Central Railroad, the Union invasion came to an end. Grant later resumed the attack, pursuing the Vicksburg Campaign along the river, where steamboats could bring supplies. 
Sherman's March to the Sea in late 1864 reversed the roles, the Union army destroying the main line of the Georgia Railroad and others. Due to the vagaries of the war, some lines would be rebuilt six or seven times by differing sides, especially in states like Virginia, where fighting was most intense.
Expansion.
Attempts were made to enlarge the Confederacy's rail system by adding or connecting lines. Of the three major rail projects the Confederate congress proposed and funded, only one of them, a connection between Danville, Virginia, and Greensboro, North Carolina, was completed. Although the Confederate constitution forbade internal improvements to aid commerce, nothing within it said anything about improvements to aid wartime defense.