While traveling, I met and fell in love with a native of an African country that's renowned for putting gay or LGBTQ people in prison. We're both men, and I'm a U.S. citizen. We've been Skyping for months, and I'd like him to come to the U.S. and marry me. But he is backpacking around the world, and hasn't gone back to his home country out of fear. Getting a visa based on marriage to another man would immediately "out" him and put his life in danger there. Which consulate can he go to for a K-1 fiancé visa?
You've asked a good question. The usual policy of U.S. consulates and embassies around the world is to process K-1 fiancé visas only for citizens and nationals of the country where the consulate is located, or for people who can show some tie to that country (for example, are living there on a long-term visa).
A backpacker who is just passing through, or who chooses to enter a country just to get a visa, won't usually receive cooperation in arranging what's known as "third-country processing."
Fortunately, however, the U.S. State Department recognizes that gays and lesbians seeking K-1 fiancé visas are in a unique and possibly dangerous situation. Therefore, it has informally developed policies for dealing with such matters. But you'll want to get an attorney's help, because the process needs to be handled quickly and correctly.
You can likely start the process on your own. You'd do this in the normal way: by you, the U.S. citizen petitioner, preparing and filing a visa petition (USCIS Form I-129F) by mail to U.S. Citizenship and Immigration Services.
There's a question on that form asking about which consulate the applicant will apply for the visa at. (It's Part 2, Question 62 in the 7/23/20 version of the form, which expires in 2022.) You have no choice but to put your fiancé's home country consulate there, but don't worry, the next parts of the process should take care of this.
After getting a USCIS receipt for the I-129F submission, you—or hopefully your attorney—will need to email the National Visa Center (NVC) and include "K-1 URGENT" in the subject line. The information conveyed within the email will need to include your USCIS receipt number, your name, your fiancé's name and place of birth, and a detailed explanation of why he is afraid to travel to his home country. The email will also need to suggest up to three alternate U.S. consulates, in order of preference, where your finance would like to attend the visa interview.
After that, the NVC will communicate with the consulates mentioned, and work out scheduling of the visa interview. Your fiancé will attend the interview and, if all goes well, be granted a K-1 visa for U.S. entry.
Another thing you might look into even before hiring an attorney is which countries might grant your fiancé an entry visa. You can't just list a few countries and expect the NVC to take care of the rest. It has no way of arranging entry for someone wishing to visit a U.S. consulate there.
Again, it would be an excellent idea to get an attorney involved. The USCIS approval of Form I-129F is good for only four months, so if you've started this process on your own, and then don't ensure that the rest happens quickly, you might end up having to start all over again.
A final note: You didn't mention whether he has tried to get another type of visa to the U.S., but just in case, you should read "Why Can't My Same-Sex Partner Come to the U.S. as a Tourist, So We Can Marry and Get a Green Card?".