The incident happened in the second half of last Friday's Heineken Cup match at Franklin's Gardens, which Ulster won 25-6.
The Saints skipper was cited after the match and pleaded guilty to the charge.
Hartley, 26, will now miss the return game against Ulster on 15 December and the home Premiership fixture against leaders Harlequins a week later.
The ban was imposed at a disciplinary hearing in Dublin on Thursday.
Earlier this year, the England hooker was banned for eight weeks after being cited for biting Ireland flanker Stephen Ferris during a Six Nations clash at Twickenham.
And Hartley was banned for 26 weeks in April 2007 after being found guilty of gouging the eyes of Wasps players James Haskell and Jonny O'Connor.
However, a European Rugby Cup statement said judicial officer Roger Morris had determined that the incident against Ulster was at the "low-end entry point" for offences committed under law 10.4 (a), which covers striking or punching an opponent,
Striking offences deemed to be in the mid-range carry a five-week suspension, while anyone guilty of a top-end offence can receive a ban of anything from eight and 52 weeks.
Speaking following the incident Saints director of rugby Jim Mallinder told BBC Radio Northampton: "He's our captain and our talisman and it's a frustration to lose him.
"But it's competitive. He's come up against an old adversary in Rory Best and although it wasn't a massive incident, it was something.
"It's playing on the edge, but not going over it, and it's something all the players have to learn."
Hartley will be free to play again from Christmas Eve but Northampton do not have a fixture until the Premiership match at Saracens on 30 December.
Northampton hooker Dylan Hartley has been banned for two weeks for striking Ulster's Rory Best.