This statement is incorrect. The final battle of the American Civil War was actually fought at the Battle of Palmito Ranch in Texas on May 12-13, 1865, but the war had already ended by that time. The Civil War officially ended on April 9, 1865, when General Robert E. Lee surrendered to General Ulysses S. Grant at the Appomattox Courthouse in Virginia. This event, known as the surrender at Appomattox, effectively ended the fighting in the Civil War and marked the start of the Reconstruction era.
The Battle of Palmito Ranch was a minor engagement that took place after the war had ended, and it had no significant impact on the outcome of the conflict. It was the last battle of the Civil War, but it was not the final battle.