A work by Harry Turtledove, sometimes called an AH classic, though really it's a time travel/ASB intervention story rather than pure AH as such. Turtledove wrote the story after speaking on the phone to one of his fellow academic authors, who complained that some anachronism on a book cover about Byzantium was 'as bad as Robert E. Lee with an AK-47'. Turtledove liked this mental image so much that he decided to wonder about how such a situation might come about…
GotS has been praised for, unlike many of Turtledove's later works, being quite compact and also only having two viewpoint characters, Robert E. Lee himself and Nate Caudell, a sergeant in the Confederate Army who later returns to his civilian job as a schoolteacher. Turtledove did a lot of research and nearly all the characters are based on real people who served in the American Civil War, though sometimes with their personalities inferred from their military records (e.g. presenting someone who had rapid promotions and demotions as a troublemaker).
Although it is arguably the prototype for Villainous Afrikaner Scenarios, the story is often cited as some of Turtledove's best work.
It's 1864 and things look grim for the Confederate States of America. General Robert E. Lee is drafting proposals for the spring campaign season, but is beginning to lose hope that he is doing anything more than delaying the inevitable. Whereupon he is visited by the mysterious Andries Rhoodie, who brings a new compact repeating rifle called the AK-47…
The Army of Northern Virginia is equipped with the rifles, which come from the town of Rivington in North Carolina, taken over by Rhoodie and his colleagues - strange men in green uniforms who speak with a vaguely Dutch or German accent. Rhoodie's group are usually referred to as 'the Rivington men', but they call themselves the AWB - supposedly standing for “America Will Break”, but actually the acronym of an Afrikaner far-right group.
The AK-47 soon proves its worth - Confederate troops take up a chant of 'Enfield, Springfield, throw 'em in the cornfield!' - and, in a series of battles through the Wilderness in Virginia, the Confederates smash the Union Army of the Potomac. Halfway through the campaign season, Lee learns from Rhoodie that the Rivington Men are time-travellers from the year 2014, who would have come back earlier but their (stolen) time machine can only travel exactly 150 years back. Rhoodie tells him a distorted version of history to justify why they have intervened to support the Confederacy. Rhoodie also helps Lee by giving him nitroglycerin tablets for his heart condition. Only a few people beside Lee know about the Rivington Men's true provenance.
The Confederates break through, take Washington, D.C., and force the end of the war. Britain and France recognise the CSA and Lincoln is forced to concede, badly losing the 1864 election soon afterwards. However, at least he escapes assassination. The CSA becomes an independent nation, but plebiscites are held in disputed Kentucky and Missouri. Kentucky declares for the CSA and Missouri for the USA.
The rest of the book covers the peacetime Confederacy and the lead-up to the Confederate presidential election of 1867. In the meantime, the USA blunders into a war with Britain and the Canadas, being successful on land (partly due to building reverse-engineered versions of the CSA's AK-47s) but having their coastal cities raided and bombarded by the Royal Navy. A general theme emerges of the Confederates, even the slaveholders, being shocked by the visceral hatred of the Rivington Men towards blacks. Not entirely trusting Rhoodie, Lee has the Confederate arsenal at Tredegar work on duplicating the AK-47 and its smokeless powder.
Eventually Lee breaks with the Rivington Men altogether after Nate Caudell finds a more accurate version of history in one of their books and shares it with his former general. Lee informs Rhoodie that, from what he has read, “you people are as out of place in your time as John Brown was in mine!”
Lee stands as a presidential candidate for the 'Confederate' party and is opposed by Nathan Bedford Forrest and his 'Patriots', who are backed by the Rivington Men. Lee narrowly wins the presidential election with the promise to end slavery through gradual manumission. Soon afterwards the Rivington Men try to assassinate him, failing but killing his wife.
This event shocks Confederate public opinion and turns Forrest and his supporters against the Rivington Men as well. The Confederates attack Rivington but are held back by the Rivington Men's machine guns and other modern weapons. Caudell calls upon a former Union soldier he met during the war, who in OTL destroyed a Confederate position in 1865 by undermining it with explosives, and he does the same unto the Rivington Men, blasting a hole in their defences. Rivington falls, Rhoodie is killed, the time machine is destroyed, and the remaining Rivington Men and their technology are captured by the Confederacy. The book ends with President Lee wondering if he will survive beyond his OTL death date so that he might see the first free black children born.
The novel's entry on Uchronia.net
The novel's entry on the Harry Turtledove Wikia
The novel's entry on Wikipedia
Americanisms (and Southernisms) in Harry Turtledove’s The Guns of the South