US District Judge Derrick Watson in Honolulu had been asked to interpret a ruling from the US Supreme Court that revived parts of Trump's March 6 executive order banning people from six Muslim-majority countries for 90 days.
The highest court let the ban go forward with a limited scope, saying it could not apply to anyone with a credible "bona fide relationship" with a US person or entity.
Trump said the measure was necessary to prevent extremist attacks. However, opponents including states and refugee advocacy groups sued to stop it, disputing its security rationale and saying it discriminated against Muslims.
Watson said in Thursday's ruling he "declines to usurp the prerogative of the Supreme Court to interpret its own order."
Hawaii said late on Thursday it would appeal against Watson's ruling to the 9th US Circuit Court of Appeals in San Francisco, according to a court filing.
The Justice Department said in a statement it was pleased with the ruling.
"We are confident that the US Supreme Court will again vindicate the president and his constitutional duty to protect the national security of the United States," it said.
Grandparents, grandchildren, aunts, uncles, nieces, nephews and cousins from Iran, Libya, Somalia, Sudan, Syria and Yemen would still be banned.
The state of Hawaii asked Watson last week to clarify the Supreme Court's ruling, arguing the government's definition of "bona fide relationship" was too narrow.
Justice Department lawyers said its definition "hews closely" to language found in US immigration law, while Hawaii's attorney general's office said other parts of immigration law included grandparents as close family.
The government reversed its position on fiances before the ban went into effect last week, saying they could also qualify for exceptions.
The roll-out of the narrowed version of the ban was more subdued last week compared to January, when Trump first signed a more expansive version of the order. That sparked protests and chaos at airports around the country and the world.
Get the latest election news, live updates and election schedule for Lok Sabha Elections 2019 on ndtv.com/elections. Like us on Facebook or follow us on Twitter and Instagram for updates from each of the 543 parliamentary seats for the 2019 Indian general elections.