Minas Gerais shares borders with Bahia and GoiÃ s ( north ) , Mato Grosso do Sul ( far west ) , the states of SÃ # o Paulo and Rio de Janeiro ( south ) and the state of EspÃ rito Santo ( east ) . It borders on Bahia and GoiÃ s ( north ) , Mato Grosso do Sul ( far west ) , the states of SÃ # o Paulo and Rio de Janeiro ( south ) and the state of EspÃ rito Santo ( east ) .