One would assume you would have already removed the cargo lid. Otherwise, not very practical at all. Need to know how long the wheel base is on the bike (regular bike hopefully) versus motorcycle.
In my opinion, unless it is a small bicycle and you can lay it down and then pad the top from the bouncing cargo lid which would need to be bungie corded big time...........You're asking for more hassle than what it's worth.
Get a trailer hitch and buy a small trailer and you would be good to go.