Henry David Thoreau opposed the Mexican-American War primarily because he believed it was fought to add more territory to the United States where slavery would be legal. Thoreau viewed the war as an immoral effort to expand slaveholding territories, which he strongly opposed. Therefore, the correct answer is:
**was fought to add more states where slavery would be legal.**