Thucydides lived through the Peloponnesian War and it had a profound influence on his writing. His History of the Pelopponesian Wars is one of his most famous works.
The war was important to Thucydides' philosophy because it was the story of a rising power beginning to brush elbows with an existing power, and the intense conflict that ensued. We have seen this phenomenon many times in history, and it is known as the Thucydides Trap.