Affleck was driven to the emergency room at Mount Auburn Hospital yesterday afternoon by his wife, Jennifer Garner.
According to his publicist, Affleck was treated for a migraine and released about two hours later.
The Massachusetts native is back in the Boston area, making his directing debut for the film "Gone, Baby, Gone," an adaptation of a novel by Dennis Lehane.
Garner gave birth to the couple's first child, a baby girl they named Violet, on Dec. 1, 2005. They were married in June of that year.
Affleck co-starred with Garner in 2003's "Daredevil," her first big movie role, but they didn't begin dating until the following year.