DHAKA, Bangladesh — Before Akayed Ullah returned home to New York from his native Bangladesh, and tried to blow himself up with a pipe bomb in a crowded Manhattan subway station, he had one last thing to do — an all-night bus ride by himself to help Rohingya refugees.

After visiting relatives here in the capital city, Dhaka, he traveled across the country, slept in a mosque and under a tree, and passed out a few hundred dollars of medicine in the crowded refugee camps.

“When he left, he seemed happy,” said his mother-in-law, Mahfuza Akhter. “But when he returned, he was so upset. He said those people were living in hell, each and every minute.”

That lonely trip across Bangladesh in September remains a mystery. Was Mr. Ullah following Al Qaeda, who had just urged Muslims to deliver medicine — and weapons — to the Rohingya, a Muslim ethnic group whose members have been raped, brutalized and massacred in neighboring Myanmar?