Onlooker Mark Olsen recorded the video Wednesday morning, when more than a dozen people spent several hours pouring buckets of ocean water into the large shark's gills and onto its skin.
The 30-foot-long shark can be seen immobile, lying on its side with a bloodied fin in the video.
Despite the efforts to save the shark, it died Wednesday afternoon, according to Lubec Town Administrator John Sutherland. He said the College of the Atlantic will be handling the shark's remains.
It was unclear how the shark washed ashore the beach.
Basking sharks are filter-feeders that mostly eat plankton and are rarely seen, swimming in deep waters, according to The Shark Trust, a U.K.-registered charity working to advance the worldwide conservation of sharks.