Odii servitutem?

would that translate to hatred of slavery?

that looks right.

You have it just backwards. Be sure to pay attention to those endings.

odium, odii = hatred
(odii is in genitive form, so it needs to be translated "of hatred")

servitus, servitutis = slavery, slaves, property, liability, easement
(servitutem is in accusative, singular form, so it would most likely be serving as a direct object or maybe an object of a preposition indicating motion toward something)

Without the entire sentence that this comes from, it's hard to tell what it really means, but just looking at the two words, it has to be something like this:

... the slavery of hatred ...

If you have the entire sentence, please post it.

Yes, "Odii servitutem" can be translated as "Hatred of slavery."