The refusal was made in October, as the FBI intensified its investigation into the backgrounds of hundreds of immigrants that were detained.
Mindy Tucker, a spokeswoman for the Justice Department, said the FBI request to use gun records was considered and rejected after Justice officials studied case law.
"It was decided that it would have been improper use of the records," Tucker said.
The denial is in line with Attorney General John Ashcroft's insistence that gun records not be used by the government.
The Justice Department's policy on gun rights was articulated by Ashcroft last spring in a letter to the National Rifle Association. Ashcroft said the original intent of the Second Amendment "unequivocally protects the right of individuals to keep and bear firearms."
Ashcroft went to Capitol Hill on Thursday to explain and defend the need for military tribunals and other legal weapons to protect Americans from foreign terrorism.
Ashcroft appeared before the Senate Judiciary Committee headed by Vermont Democrat Patrick Leahy, a chief critic of measures the White House has taken in the U.S. war on terrorism.
Leahy and other members of Congress, mostly fellow Democrats, along with a number of human rights groups, have challenged the constitutionality of many of the moves.
The government's record database, called the National Instant Criminal Background Check System, is used to help prevent criminals and certain others from purchasing guns.
It is a compilation of record checks performed when gun dealers send information to the FBI to find out if the potential buyer is prohibited from owning a gun.
Those not allowed to own guns are felons, fugitives, and some types of foreigners. The records are destroyed after 90 days, in keeping with statutes that prohibit the government from keeping permanent records on gun buyers.
"The only approved use of the records is for audits, to ensure the system works," Tucker said. "Once that determination was made no more records were run."
The New York Times, which first reported the incident Wednesday on its Internet site, said the Treasury Department's Bureau of Alcohol, Tobacco and Firearms asked the FBI to check a list of 186 names of detainees against the background check records.
The FBI found that two of the detainees had been approved to buy guns.
But before more records could be run, the Justice Department stopped the FBI from accessing the records to check on the detainees a refusal that was repeated after high-level FBI officials asked for the matter to be reviewed again.
© MMI, CBS Worldwide Inc. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. The Associated Press and Reuters Limited contributed to this report