1865 is an incredibly early POD, so there's a lot of possibilities.
True, but even then, in 1865, the USA is a consolidated democracy. After a democratic state has lasted with almost-total consensus for even a couple generations, let alone 1789-1865, it's very rare for it to fall apart in a single coup.
The biggest two prerequisites are for America to devolve into an unconsolidated democracy, such that a coup d’état is possible,
Hmm...
1. During the Grant presidency, Grant goes even further in using martial law and the US army to attempt to crush the Klan. However, his heavyhanded efforts prove counterproductive; increasingly resentful Southerners begin taking up arms again, with the KKK becoming the primary paramilitary group.
for the KKK to gain enough political support to be capable of a coup.
2. Grant also takes strong measures against increasing labour activity/strikes. The KKK begins to support and even smuggle arms to the more nativist elements of the Unions, causing Grant to take stronger and stronger action against them...but, once again, this backfires, with nativist workers ever more inclined to the Klan.
3. With martial law lasting ever more often and spreading ever more widely across the country, the Army and National Guards begin to stand off against one another. It becomes increasingly obvious that something has to break...
4. 4 May, 1886. A bomb is detonated during a labor demonstration at Haymarket Square, Chicago. The Army is called in to conduct en masse arrests, essentially imposing martial law across much of the State.
5. The Governor responds by ordering out the National Guard, and it looks like conflict between the Guard and Army is inevitable, a conflict likely to domino across the country. Various Red groups make visible preparations to take advantage of the chaos...
6. Various KKK members approach sympathetic Army and Guard officers and units, presenting a KKK-led mass Coup d'Etat as the only alternative to a second civil war and Red Anarchy. Many units are persuaded, and somehow, the secret holds.
7. Later that summer, the codeword "Jefferson" is passed to assembled KKK, Army, and Guard units across the country, whilst KKK members carry burning crosses throughout the countryside, simultaneously rallying poor whites sympathetic to the Klan to join them whilst intimidating African-Americans to keep their heads down. In the next forty-eight hours, the Army and Guard seize statehouses and arsenals throughout the country. They are remarkably successful, managing to seize all of the East and Midwest outside of New England and New York, where there are no sympathetic Army or Guards units stationed, and northern Illinois, where a Red counter-coup begins. The Democratic governor of New York, seeing the writing on the wall, accedes to placing the state under allegiance to the Coup government (though Irish rioters in the City, when hearing what has happened, are less than enthused), whilst the President and Congress, surrounded by mutinous units, agree to give a Coup commander (I can't think of anyone in particular likely to play this role) emergency powers. In much of New England, the NG mobilizes, but by the end of 1886 after a few battles and skirmishes, the new government is in control across the Continental US. A constitutional convention is called, creating an oligarchic system in many ways similar to OTL Apartheid, and outside of sporadic irregular resistance the KKK-backed government is now totally in control of the country.