I love my boyfriend but I feel like he is just digging himself in a deep hole

My boyfriend had got a DUI in July of 2018. The judge ordered him to go to rehab classes, he didn't go because he lost his job. The job put an order for him to be in jail. But luckily the judge gave him a second chance. The other he drove two hours to go see the judge. Him and mother got into an argument that he was to upset to see the judge that he left. Today he went to the judge and explained to her what had happened, I guess she got tired of his shit that she ordered him to leave court and go straight to jail for 5 days & that he had to turn himself in by 4pm. He didn't do that instead he got weed to come him down & he procrastinating. The judge said if he didn't turn himself in by 4, he would have to do 6 months. The original sentence was 15 days if he didn't finish his classes. But since he failed to appear in court, she wanted him to be in jail for 5 days. He tried turn himself in ... like 5 hours later. But they didn't accept him. I love him so much but I feel like he's not being responsible and he's not taking this serious. He could lose his green card. He doesn't work. Hasn't work since July. His mom and I both got him a job & he slacked those both times. I believe if you love someone , you don't give up on them. I just wish he would be a man and would of went instead of bullshitting. He claims the traffic "messed him up" which there was traffic but he also went to get weed. I'm extremely stress out by him .