It can work like most murder mysteries do.
You start the RP, with you being the murder victim. Assemble a number of people to join, and then pick a murderer from among the group. The murderer should act as they normally would, to not give it away. A few clues can be given to start, and everyone knows that one person among them is the murderer, though they don't know who, obviously. They can socialize amongst themselves, asking questions to each other, to try to figure out alibis and whatnot. People could even conspire to lie for each other if they wanted to. If they get to a point where a clue needs to be revealed, you can tell them what they find, or you can just plant suddenly clue discoveries throughout the story. There could even be additional murders, if you so choose. Can kinda add to the story if a highly suspected person suddenly gets murdered.
Once the majority of people are in agreement of who the murderer is, something can happen to reveal the answer, or you can just tell them outright.
I don't participate in RPs, so I probably won't join, but I still think the idea is interesting.
(Also, each person in the RP would need a "role" to play, such as being the murder victim's family member, friend, spouse, etc.)