Book Title With Exclamation Mark Followed by a comma
Since "according to Eric Foner in his book Give Me Liberty!" is a distinct clause within the sentence, and given that Give Me Liberty! is the title of a book, it's grammatically correct to enclose the clause within commas. Though it may look awkward, it is perfectly acceptable.
There are a number of movie musicals with exclamation marks in their titles - for example, Oklahoma!, Girls! Girls! Girls!, and Oliver!. You couldn't list these without commas between them (otherwise it would appear as though there were three movies called Girls!), so your use of a comma in the context you describe seems perfectly acceptable.
I would say yes, correct, if that's the literal name of the book.