To attain the correct understanding of this verse it is necessary to read it in conjunction with three other verses:

1-The only duty of the messenger is to deliver God's message:

The sole duty of the messenger is the delivery (of the message). 5:99

2-Prophet Muhammad was commanded by God to follow nothing other than the Quran which was revealed to him:

Say (O Muhammad), "I am not a novelty (any different) among other messengers, nor do I know what will happen to me or to you. I follow nothing other than what is revealed to me (Quran). I am no more than a clear warner. 46:9

3-Muhammad was commanded by God to rule among the people with the Quran and nothing else:

And We brought down to you (O Muhammad) the Book (Quran), truthfully, confirming what is present of the Scripture, and superseding it. So rule among them in accordance with what God has brought down (Quran), and do not follow their desires in place of what has come to you of the truth.5:48

By means of the message of the above verses it is possible to have a better understanding of 4:80. The words in 4:80 state that the one who obeys Muhammad would have obeyed God simply because Muhammad will preach nothing other than the Quran which was revealed to him by God.