Adding my 2 cents. It is my understanding that you have to prove that the child was abandoned by bio parents or they are deceased. If the grandmother has physical custody she is not considered abandoned or an orphan. The grandmother nor the bio parents can turn over custody to you. You are missing that legal requirements for adoption in Mexico and legal requirements for immigration are two different sets of laws.
you can still adopt her but she will not be able to immigrate to the US. So she will still be living with her grandmother and now you will be providing her the money to support the child.