Attorney Patricia Apy, who represents David Goldman, said she was notified of the decision Monday afternoon. The ruling calls for the boy to be turned over to his father on Wednesday, Apy said.
The boy's Brazilian mother took him to Brazil in 2004. She remarried and never returned to the United States. She died last year of complications from the birth of another child.
Eight-year-old Sean Goldman was being raised by his stepfather.
A Brazilian lawyer for the mother's family said he will appeal the decision to return the boy.
"Many times the boy has expressed his desire to stay in Brazil," attorney Sergio Tostes told local Globo TV. "We are doing everything we can to see justice prevail."
A telephone call to David Goldman's home in Tinton Falls connected to an answering machine with a full inbox Monday night.
U.S. Rep. Christopher Smith, a Republican from New Jersey, intervened in Goldman's case in February and traveled to Brazil with him. While Smith was there, Goldman was able to meet with his son for the first time in nearly five years.
The case got high-level attention with international diplomatic overtones this spring when the U.S. House and Senate called on Brazil to permit the boy's return, Secretary of State Hillary Rodham Clinton made the same request and the presidents of the U.S. and Brazil discussed the matter.
Clinton said Goldman's case is an example of a problem around the world. She said there were nearly 50 U.S. children in similar situations in Brazil who should be returned to the U.S. - and more around the world.
Clinton brought up the subject while speaking Monday at a joint news conference in San Salvador, El Salvador, with newly inaugurated Salvadoran President Mauricio Funes.
"It's taken a long time for this day to come, but we will work with the Goldman family and the Brazilian government with the goal of ensuring this young boy's return," she said.
Apy said Monday night that she had not received a copy of the Brazilian court decision but expected to get one and have it translated from Portuguese into English on Tuesday.
The order calls for the boy's immediate return, Apy said.
"The court has made remarkable conditions to be able to facilitate that happening," she said.