Alivardi 's commander Syed Ahmed freed Mir Jafar and his family .
Syed Ahmed , commander of Alivardi , freed Mir Jafar and his family .

Do these sentences mean the same thing?
yes