Parker finished with 23 points as Duke (20-5, 9-3 ACC) recorded a third straight win in the last-ever regular-season meeting between the longtime Atlantic Coast Conference rivals.
Maryland will join the Big Ten Conference next season.
The Blue Devils secured the victory when Charles Mitchell's shot from lane rolled off the rim with 1.1 seconds left.
Rasheed Sulaimon and Rodney Hood each added 11 points.
Amile Jefferson helped out with seven points and 12 rebounds for the Blue Devils.
The Terrapins (14-12, 6-7) were paced by Jake Layman with 18 points and six rebounds.
Dez Wells totaled 17 and six.