This is an ultimatum from God and His messenger to those who set up partners with whom you had entered a treaty.
Translation endnotes
[9:1] Those who abuse the Quranic statement "obey God and His messenger," to mean obeying the Quran and numerous books of hearsay, are convicted by this verse. By claiming that God is represented by the Quran, but the messenger is represented by hearsay collections produced centuries after Muhammed, they separate God and messenger from each other (4:150). Verse 9:1 attributes the ultimatum issued in this chapter to "God and His messenger." Since, God did not author the Quran in consultation with Muhammed, the only reason why the messenger was mentioned after God, is that the messenger will deliver the ultimatum as it is, like a trustworthy mailman. Thus, we should use similar inferences when we see verses telling us to "obey God and His messenger." Those verses do not mean God and His messenger represent different authorities or sources, but simply mean, "Obey God by obeying the message brought to you through His messenger." In the Quran we do not see a single verse instructing us to "obey Muhammed" or "obey Moses;" the verses always refer to obeying the messenger, since messengers' sole mission is to deliver God's message without distorting, adding, or subtracting from it. The messenger, on the Day of Judgment (25:30), will reject those who distort, add to, and subtract from God's message by hearsay. It is also noteworthy that the verb used for God and His messenger in 8:24 is in its singular form. Remind verse 6:114 to the polytheists who wish to raise Muhammed from the position of messengership to the position of legislator next to God. Also, see 49:1.