Yes you are very wrong for doing that. It's not cool to lead people on, and if you are not currently going out with both men at this time, then I'm not saying that's what you're doing, but you're putting yourself in a situation where that can happen.
Sex and love are not games. Think about it, sex is the most intimate act that two people can share together, and if it's done on a regular basis, then it's natural for at least one person to end up developing feelings.
And obviously when someone falls in love, that's a big deal. People have been known to kill themselves because they got rejected/used. In fact I saw that happen to a relative of mine, he killed himself over a girl that he had been involved with. And he was only in his mid 20s.
So please think carefully about what you're doing. Would you want someone to two-time you? I don't think you would. So then why do that to someone else?
"Treat others the way you want to be treated." - AKA, the GOLDEN RULE.