One of the most striking elements of World War I was the fact that nearly every nation in the world had some stake in it. For example, while nations in Europe did do battle, their colonies were inexorably pulled into the conflict. When America entered the war, it enhanced the idea that the war was something to be fought on the world stage. This is present in the Second World War, when nations around the world were plunged in the conflict in much of the same way as the First World War. The global and protracted nature of both, the sweeping change caused to the continent, as well as the shadows of misery both wars cast on the world consciousness make them similar to one another.
The American Civil War has some similarities, in that the technology of war was way ahead of the tactics used by the the troops who fought in it, so there were dreadfully high casualties. This was also true of World War I. The Civil War saw the world's first machine gun, a forerunner of the more advanced versions in the Great War.
In addition, near the city of Petersburg, Virginia in the last year of the Civil War, long lines of trenches and fortifications were built by both sides and a long six month siege set in including large scale artillery bombardments. Some historians call this a precursor to World War I trench warfare style fighting.
The Civil War also relied almost exclusively on infantry charges, much like World War I, and the casualty rate reflected this.
I guess this is going to depend on what kind of similarities you are looking for.
Militarily, the war that was most like this war, in my opinion, was the American Civil War. In both wars, defense had a huge advantage over offense. In both wars, the people directing the offensive actions had not figured this out yet. In both wars, there were a lot of massed charges against set defensive positions that ended up in massacres of the attackers.
It is often said that the trench warfare of WWI could have been avoided if European military types had taken the Civil War more seriously. But the US was not seen as a serious military nation at that point so they ignored the lessons of the Civil War.