<P> Ted is Barney 's self - proclaimed best friend and `` wing man '' . They meet in 2001 at MacLaren 's , and Barney takes it upon himself to `` teach Ted how to live '' . While Ted is often annoyed by Barney 's antics , he considers him a good friend , and in `` Miracles , '' says that Barney is like a brother to him . Their friendship has been tested , however ; in `` The Goat '' , Ted finds out that Barney and Robin slept together and ends their friendship , and refuses to speak to him for several episodes . In the third - season finale , `` Miracles '' , however , Ted forgives Barney after Barney severely injures himself while trying to help him . They remain an important part of each other 's lives for the rest of the series , with Barney comforting Ted after he is left at the altar in `` Shelter Island '' and Ted teaching Barney how to be a good boyfriend to Robin in `` Robin 101 '' . Ted is the best man at Barney 's wedding , and , along with the other main characters , is present for the birth of his child . </P>
<P> Ted is Barney 's self - proclaimed best friend and `` wing man '' . They meet in 2001 at MacLaren 's , and Barney takes it upon himself to `` teach Ted how to live '' . While Ted is often annoyed by Barney 's antics , he considers him a good friend , and in `` Miracles , '' says that Barney is like a brother to him . Their friendship has been tested , however ; in `` The Goat '' , Ted finds out that Barney and Robin slept together and ends their friendship , and refuses to speak to him for several episodes . In the third - season finale , `` Miracles '' , however , Ted forgives Barney after Barney severely injures himself while trying to help him . They remain an important part of each other 's lives for the rest of the series , with Barney comforting Ted after he is left at the altar in `` Shelter Island '' and Ted teaching Barney how to be a good boyfriend to Robin in `` Robin 101 '' . Ted is the best man at Barney 's wedding , and , along with the other main characters , is present for the birth of his child . </P>
when do barney and ted become friends again
when do barney and ted become friends again
In the third - season finale , `` Miracles ''
In the third - season finale , `` Miracles ''