Up to six shots were fired. It is believed the man was shot in the head.
The shooting happened outside a pub in Sheriff Street/Oriel Street area at about 12:30 local time on Thursday.
RTÃ‰ is reporting that the attack may be linked to a gangland feud and that Thursday's shooting may be a case of mistaken identity.
A man believed to be in his 20s has been shot dead in Dublin.