JetBlue flight 915 landed safely in Michigan around 8 p.m. and officials say there were no injuries, aircraft damage or delays.
The laptop was in a backpack in the cabin of the plane and the flight was on its way to SFO from New York's JFK.
The plane had to make an emergency landing in Grand Rapids Michigan.
At some point during the flight, passengers say they smelled smoke, and then the fire was discovered, and the flight was diverted.
A woman on the plane spoke with the ABC affiliate in Michigan. "I was stunned. I knew something was going to happen because you know, lithium batteries catching on fire when you're up at 38,000 feet -- you can't help but think you gotta do something. So I was prepared for it," said Kat Honniball.
The fire was put out before the plane landed around 8 p.m. in Michigan.
JetBlue released a statement saying: JetBlue 915 from New York's JFK to San Francisco diverted to Grand Rapids, Michigan following reports of smoke emitting from a carry-on bag holding an electronic device. The flight landed safely and the aircraft is being inspected by maintenance crews before customers continue on to San Francisco.
Honniball's daughter Kailey was also on the plane. She told ABC7 News in an email that they were stuck in Michigan for almost three hours. She also said people were patient at first but became pretty frustrated.
The flight originally would have landed at 9 p.m. at SFO. Now, it's expected a little after midnight Wednesday.
JetBlue Flt#915 f/JFK-SFO landed w/o incident here shortly after 8pm after reports of a lithium fire onboard. Airport FD responded (cont)— FlyGRFord (@FlyGRFord) May 31, 2017
Our Fire Department cleared the scene, no injuries and all clear for JetBlue Flt#915. Plane is fueled up, & will be back en route to SFO— FlyGRFord (@FlyGRFord) May 31, 2017