This is wrong. Legally if the current parent or guardian wants you to take custody of their child, and you're willing to do so you can go through with it with no involvement of the legal system regardless of if there's any blood relationship.
No, what I wrote is correct. You are conflating the categories "custody" and "guardianship".
A parent can give anyone guardianship over their child, with or without the legal system being involved (for example, due to extended illness or travel). Doing it with legal paperwork is more secure, of course, since it will survive more challenges.
Custody - especially "legal custody" - is a much more significant category. Parents, both by birth and adoption, have a legal right to custody over a child which cannot be taken away except under extraordinary circumstances. It also cannot just be given away - no parent can go to their neighbor and turn over legal custody of their child without any sort of legal process.
Guardianship rights and responsibilities are generally very narrow, rarely extending beyond basic healthcare decisions. Custody rights and responsibilities are very broad, and include everything we might normally include under parenting.
Guardianship is fairly easy to take away - I can give guardianship of my child to a neighbor or relative, but it woudln't take much for a court to revoke it. Custody is much harder to take away. Both parents and the courts can grant or transfer guardianship. Only the courts can terminate or transfer custody. Guardians
certainly cannot transfer custody, which you claim above and which is part of why I believe you're confusing the two.
All legal custodians are also guardians, but not all guardians are also custodians.
As father, Marquis should have had more-or-less an automatic right to custody of Amy. He would have had to prove the relationship, of course, and the fact that he wasn't around since birth would have had to be explained. A court might have wanted to see that he wasn't a bum living on the street, but as long as the mother didn't file paperwork seeking to terminate his legal custody of her for good reasons (like abusive behavior), the process should have been fairly smooth.
Before dying, Marquis could legally grant guardianship of Amy to Carol. That, however, is a long way from legal custody, much less adoption. Carol had no legal basis for caring for Amy on any sort of extended basis, so as her
temporary guardian she would have had a responsibility to take Amy to the proper legal authorities who then would have decided her custody based on her best interests. Carol certainly could have filed for legal custody and eventually adoption, but it's unlikely that either would have been awarded. Even further guardianship is unlikely.
Put in more general terms, a dying person who hands you a baby saying, "Please, take my son! Save him!" is granting you temporary guardianship of the child, but not custody. As guardian of the child, you have a responsibility to ensure the child's welfare and safety, but you can't keep him permanently. When it's feasible, you have a responsibility to contact the relevant authorities so they can make a determination about legal custody. Depending on what's going on, they might extend your guardianship or they may take that over. You can file for custody if you want, but probably won't be very high on the list of candidates.
Especially if you're the one who killed the child's last living parent. That's just bad form.
The actual specifics of custody and guardianship vary from state to state, and certainly from nation to nation, but in the United States at least the above general principles are true everywhere.