The film, directed by "I'm Not There" co-writer Oren Moverman, showed Monday at the Berlin film festival. It stars Harrelson and Ben Foster as officers responsible for informing families about the deaths of soldiers in Iraq.
The crew spent time at the U.S. military's Walter Reed Army Medical Center and at Army bases during the filming.
That "really left me with a profound respect and compassion for these people who are going over to Iraq and Afghanistan" and other conflicts, Harrelson said at a news conference.
"I've been pro-peace outspokenly, and I think for good reason," he said. "On the other hand, I think that what was missing from my own philosophy was a real understanding of what these soldiers are going through."
Moverman said the U.S. Army supported the movie, offering technical advice.
"The Messenger" is among 18 contenders for the top Golden Bear award in Berlin. The winner will be announced Feb. 14.