In fact, Sirius Black was Harry's godfather and fiercely protective of him. He risked his own life to ensure Harry's safety and was a close ally to Harry and his friends.
The events you're describing are likely from a fan-fiction or some other non-canonical source.
It's important to distinguish between the actual events in the Harry Potter books and fan-created stories.