The motion claimed the confession should be dismissed because the attorney representing van der Sloot at the time was state-appointed.
Superior Court Judge Wilder Casique rejected the habeas corpus move made on behalf of Van der Sloot, who is jailed pending trial on charges of first-degree murder and robbery in the May 30 death in his Lima hotel room of 21-year-old Peruvian business student Stephany Flores. He met her while playing poker in a casino.
Van der Sloot, 22, also remains the sole suspect in the unresolved 2005 disappearance of Alabama teen Natalee Holloway on the Caribbean island of Aruba. He's never been charged in that crime.
Flores' brother hailed the decision in an interview with CBS News, and said his family has been in touch with Holloway's.
Peruvian police say their search of van der Sloot's computer discovered e-mails relating to the Holloway case. In his confession, van der Sloot said he killed Flores after she read one of those e-mails.
Casique noted in a statement that Van der Sloot had, in addition to the lawyer, been afforded a Dutch-Spanish interpreter vetted by the Dutch Embassy.
Van der Sloot recanted the confession in a jailhouse interview with the Dutch newspaper De Telegraaf, claiming it was made under duress.
The defendant's lawyer, Maximo Altez, told The Associated Press he would appeal Casique's decision to a higher court.
A criminal law expert, Jose Balcazar, told the AP that Van der Sloot can continue the appeal but "that will not hold up the case against him."
Van der Sloot Alleged Victim Was on Amphetamines
Inside van der Sloot's Prison Cell
Why Would Any Woman Want to Marry van der Sloot?
Van der Sloot Boasts of Marriage Offers
Van der Sloot Clams Up with Peruvian Judge
Expert: Van der Sloot's Moms Words May Boost Insanity Plea
Van der Sloot Claims He Gets Proposals
Earlier Friday, the chief judge of Lima's Superior Court, Cesar Vega, told reporters that Peruvian laws allow up to six months for murder trials.
But legal expert Mario Amoretti said that in practice, cases like Van der Sloot's can last 18 months.
Balcazar said the defense is likely to try to draw the trial out.
If convicted, Van der Sloot faces between 15 and 35 years in prison.