The director, who is adapting the James McBride novel Miracle At St. Anna, said that he was attracted by the idea of doing something different.
It opens across the US next week and stars Laz Alonso, Michael Ealy, Derek Luke and Omar Benson Miller as soldiers.
Lee said: "I liked the challenge of doing a war film. I don't want to do the same thing again and again, and the people I surround myself with - they feel the same way."
Earlier this month, the director announced that he would like to cast Wesley Snipes as James Brown in a biopic of the soul singer.
"If my James Brown picture ever gets made, he'll be playing James - and he'd kill in that, without a doubt. He still has chops," he said.