Louie's biological father found him and asked Casey and Dawson for the ability to meet his son, but then never showed up for the meeting. In Season 5, Episode 10 ("The People We Meet"), he came to Firehouse 51 and told the couple that he was being deployed, so he planned to sign away his parental rights. "You two are good for him," he said.
Dawson decided that Louie should nonetheless get to meet his father and arranged for a dinner together, during which the man had a change of heart. He went back to the firehouse the next day and told Dawson and Casey that he was prepared to fight for legal custody of Louie.
When they showed up to the courtroom, Louie's entire extended family was there to showcase how much love he would be surrounded by if he went home with his father. Seeing this, Dawson decided to drop the legal battle and let Louie go.
"I love you, I always will. I will always be here for you, for the rest of your life," Dawson told Louie in a tearful goodbye.