Rap a Capella. Once you have mastered rapping along to a beat, trying rapping the song completely by yourself. If you can do this correctly for many songs, it's safe to say you've mastered rhythm and staying on-beat.
Practice by just reading the lyrics. Then, read the lyrics like you're trying to get a raise from your boss. Try to get it on the beat. Imagine when you are rapping that you are doing it in front of someone you know well and respect. Don't try to make your voice sound like someone you're not. Relax.