De la Rua has pursued his claims in courts in Switzerland and New York, but those actions have been dismissed.
"I am very grateful that the courts are not allowing these groundless lawsuits to proceed," Shakira, whose full name is Shakira Isabel Mebarak Ripoll, wrote in a statement Thursday.
"I have moved on in my life and could not be happier now. I hope this harassment will now come to an end."
Judge Rejects Shakira Ex's Plea to Access Bank Account
Khan's ruling does not address the merits of the case, but he determined that the case should not be heard in Los Angeles.
Rachel Fleishman, an attorney for de la Rua, argued during a hearing Wednesday that the case should be heard in Los Angeles because its judges were experienced in the complexity of entertainment contracts and Shakira frequently travels to the city to serve as a judge on the competition show "The Voice."
She also argued that many of the witnesses in the case live and work in Los Angeles.
Shakira's attorney Daniel Wall argued that de la Rua was scouring courts to try to get their case heard, but that it should be handled by judges in other countries.
De la Rua sought access to Shakira's Swiss bank accounts, but a judge rejected that effort in June. He also sued the singer in New York, but the case was dropped.
"When Switzerland didn't work out and New York didn't work out, they filed this case in Los Angeles," Wall said.
"This is a classic case of, `you can run, but you can't hide,'" de la Rua's attorney William T. Reid IV wrote in a statement. "Eventually, Ms. Mebarak will have to respond to his claims because she will run out of procedural arguments and delay tactics."
De La Rua dated Shakira, whose songs include "Hips Don't Lie," for more than a decade and worked on some of her business deals.