A lawyer nationally known for being a champion of gay rights died after setting himself on fire in Prospect Park in Brooklyn early Saturday morning and leaving a note exhorting people to lead less selfish lives as a way to protect the planet, the police said.

The remains of the lawyer, David S. Buckel, 60, were found near Prospect Park West in a field near baseball diamonds and the main loop used by joggers and bikers.

Mr. Buckel left a note in a shopping cart not far from his body and also emailed it to several news media outlets, including The New York Times.

Mr. Buckel was the lead attorney in Brandon v. County of Richardson, in which a Nebraska county sheriff was found liable for failing to protect Brandon Teena, a transgender man who was murdered in Falls City, Neb. Hilary Swank won an Academy Award for her portrayal of Mr. Teena in the 1999 movie “Boys Don’t Cry.”