The 26-year-old will stay on loan at Birmingham until the end of the season.
Rubin coach Kurban Berdiyev said: “His child was born, and he asked to let him go to England, because Obafemi wants to be closer to his family.”
West Brom also tried to sign the former Newcastle United striker.
“Few things separated the interested parties but we are confident the right choice was made,” said Martins’ agent Nicolas Walter to BBC.
“Everything concerning the paperwork should be sorted in couple of days.”