Pittsburgh's Marcus Pettersson appeared to score the winner earlier in overtime, but the Penguins were called for a too many men penalty on the play.
The Devils have won two straight at home in overtime, beating the Rangers 4-3 on Jan. 7 in the same manner.
Hughes opened the scoring just 56 seconds into the contest, beating Penguins netminder Tristan Jarry on the glove side for his 30th goal of the season. Hamilton drew the lone assist.
The 21-year-old Hughes, in his fourth season with New Jersey, is the second player in Devils history to reach the 30-goal mark before his 22nd birthday. Brendan Shanahan reached the milestone on March 29, 1990.
Pittsburgh's Sidney Crosby tied the contest with his 22nd goal of the season - and the 539th of his career - at 6:25 of the first period with assists from Jake Guentzel and defenseman Jeff Petry. Jarry had 23 saves.
Crosby leads the Penguins with 54 points in his 18th NHL season. He has 39 goals and 49 assists in 88 career games against the Devils, Crosby's third-highest total against one franchise (52 vs. Philadelphia and 40 vs. the Islanders). The only active player with 40 or more goals against three different franchises is Washington's Alex Ovechkin, who has done so against eight teams.
The Devils are 17-10-2 against the Eastern Conference and 9-5-2 against division opponents ... The Devils scratched forwards Alexander Holtz and Fabian Zetterlund and defenseman Nikita Okhotiuk ... The Penguins scratched defensemen Ty Smith, Jan Rutta and forward Kasperi Kapanen ... The Devils won the previous meeting, 4-2 on Dec. 30 in Pittsburgh ... The teams meet again Feb. 18 in Pittsburgh and Apr. 4 in Newark.
Devils: Host the Vegas Golden Knights on Tuesday.
Penguins: Host the Florida Panthers on Tuesday.
AP NHL: www.apnews.com/hub/NHL and www.twitter.com/AP--Sports