<Dl> <Dd> Appears in 13 episodes from "Single Stamina" to "The End of the Aisle" </Dd> </Dl> <Dd> Appears in 13 episodes from "Single Stamina" to "The End of the Aisle" </Dd> <P> Played by Wayne Brady, James is Barney's gay African - American half - brother; they are very alike and act as each other's "wingmen". This changes when James meets Tom, his future husband . Barney tries to stop his brother from marrying but changes his mind when he learns that they are adopting a baby . James marries Tom and they have a son named Eli . In the season 6 episode "Cleaning House," James finds out his father is Sam Gibbs after he and Barney discover an unsent letter that their mother Loretta addressed to him . At the end of "The Rebound Girl", it is revealed that James and Tom have adopted an infant daughter named Sadie . In "Coming Back", James announces that he is getting a divorce after Tom discovered him cheating . Robin wins James' wedding ring in "The Poker Game" and refuses to give it back because James has been saying that she and Barney should not get married . Barney initially stands by his brother, but then realizes that James' selfishness is what caused his own marriage to fail . James reveals that Gary Blauman was one of the guys that he cheated on Tom with in "Gary Blauman". Future Ted explains to his children that James and Tom did eventually get back together, and raised Eli and Sadie as a happy family . </P> <Dl> <Dd> Appears in 13 episodes from "Architect Of Destruction" to "Gary Blauman" </Dd> </Dl>

Who plays james on how i met your mother