Tax Return question / claiming bfs child

Okay so my LIVE IN boyfriend has a child. He and the mother rotate who claims the child on their taxes every year . Last year was her year to claim. This year will be his. However, he owes way too much money for student loans to even file taxes this year. Last year, the IRS took every dime from him. He is wanting ME to claim this child on my taxes this year so that he can recieve some money back. He has joint custody . The mother of the child knows what is going on and is okay with me claiming their child. Is this illegal?