No, he didn't. The only thing Eddie Van Halen did for that song was record the guitar solo.
I read or watched a long time ago Eddie(or someone else) saying he composed that riff and solo.
But who knows,people like gossip.
If it wasn't him does anybody know who composed that riff?
Google gave me this =
Who wrote the famous guitar riff for michael jacksons beat it?
The famous guitar riff and solo from michael jackson's song ''beat it'' was done by famous guitarist Eddie Van Halen