Coiley made a free throw with 54 seconds remaining in the first quarter to gave the Ponies a lead (7-6) that they would hold the rest of the game.
Foxcroft went on a 12-2 run in the second quarter to take a 21-10 lead.
Morgan Card scored the final four points of the half for Ellsworth, to cut the Foxcroft lead to 21-14 heading into the second half.
The offense picked up for both teams in the third quarter.
Foxcroft took their biggest lead of the game when Brittany Dyer made a three pointer to give them a 36-22 lead with 1:13 remaining in the third quarter.
Ellsworth scored the next seven points to get the Ponies advantage down to 36-29 late in the third quarter.
Coiley hit a three pointer right before the end of the third quarter buzzer to give the Ponies a 39-29 lead.
Foxcroft went 6-6 from the free throw line in the final 2:30 to secure the victory.
Brianna Skolfield recorded 15 points (7-9 FT), 10 rebounds, three assists, and one block for the Ponies.
Freshman Grace Bickford came off the bench to record four points, four rebounds, four assists, and three steals in 20 minutes.
Dyer chipped in with seven points and two rebounds. Julia Annis added two points and four rebounds.
Coiley also had two assists and two steals.
Amber Anderson added four rebounds and two assists for the Ponies.
The duo of Coiley and Skolfield helped Foxcroft out rebound the Eagles 39-21.
Foxcroft shot 15-31 from the free throw line, while Ellsworth shot 7-11.
Morgan Card led the Eagles with 11 points, seven rebounds, and two steals.
Hailee Langley recorded six points, four rebounds, two assists, and two steals. Madison Card added six points, four steals, two rebounds, and two assists.
Samantha Mason chipped in with five points. Sydni Palmer scored two points, Maddie Dow finished with one point.
The win put the Ponies in great position to get a home preliminary round game when the tournament starts in three weeks.
Foxcroft (8-6) currently sits fourth in the MPA class B heal point standings. The top three advance to the quarterfinals at Cross Insurance Center.
The teams seeded 4-8 will get a home prelim game.
The Ponies will host Hermon on Friday evening.
The Eagles are currently 10th in the class B standings. The top 13 qualify for the tournament in class B.
Ellsworth (5-8) will make the trip north this weekend for games against Presque Isle and Caribou.