He was neither.
https://www.britannica.com/story/was-martin-luther-king-jr-a-republican-or-a-democrat
More detail: "The official answer is neither. King talked very infrequently about his personal politics and was not formally affiliated with either political party. Nor did he explicitly endorse any candidate. In fact, he stated, 'I don’t think the Republican Party is a party full of the almighty God, nor is the Democratic Party. They both have weaknesses. And I’m not inextricably bound to either party.' What’s more, the parties of King’s time were different from the parties we know today; policies and platforms have changed drastically over time."