The Scottish Premiership side opened the scoring when Ryan Dow flicked home Nadir Ciftci's cross before the latter doubled the lead from the penalty spot.
Stuart Armstrong fired home just after the hour before a second spot-kick, converted by substitute Brian Graham, rounded off the scoring.
Inverness Caley Thistle were also victorious as they beat Elgin City 2-1 at Borough Briggs.
Craig Gunn had the League Two hosts ahead when he netted from close range but Billy McKay levelled before Marley Watkins grabbed a late winner.
Europa League hopefuls St Johnstone had to rely on David Wotherspoon's equaliser saving them from defeat against Raith Rovers after Christian Nade had put the Fifers ahead at Stark's Park.
St Johnstone open their European campaign against Swiss side FC Luzern on Thursday, while Motherwell warmed up for their Euro opener against UMF Stjarnan with a 2-0 home defeat by Fulham.
Over in Spain, Brighton carried too much firepower for Partick Thistle as the Championship side posted a comprehensive 4-0 win.
The Scottish Premiership side started brightly but ultimately they had no response to goals from Gordon Greer, Craig Mackail-Smith, Shamir Fenelon and Charlie Harris
Hibernian, meanwhile, eased past Berwick Rangers as debutant David Gray, Liam Craig, Tom Gardiner and Lewis Allan handed them a 4-0 win.
Edinburgh rivals Hearts were also in winning form with a 3-0 win over East Fife following strikes from Prince Bauben - who the club are hopeful of signing - Gary Oliver and Swedish trialist Osman Sow.