Obama has never served in the military. However, during an interview in 2008, Obama revealed that he did entertain the idea of joining the service after graduating from high school.
“You know, I actually did. I had to sign up for Selective Service when I graduated from high school. And I was growing up in Hawaii. And I have friends whose parents were in the military. There are a lot of Army, military bases there. And I actually always thought of the military as an ennobling and, you know, honorable option. But keep in mind that I graduated in 1979. The Vietnam War had come to an end. We weren't engaged in an active military conflict at that point. And so, it's not an option that I ever decided to pursue.”
September 6, 2008: Obama speaking to George Stephanopoulos on ABC’s ‘This Week’
His grandfather, Stanley Dunham, served with the Army during World War II. He was a supply sergeant with the 1830th Ordnance Supply and Maintenance Company and was involved in combat several times, most notably during D-Day.