This law was enacted during the reign of Charles II and its full name was An Act to prevent the delivery up of Merchants Shipps, and for the Increase of good and serviceable Shipping. It came into being because the captains and crews of merchant vessels commonly refused to fight when attacked by pirates. The act stipulated that ships of 200 tons or more possessing at least sixteen guns were required to fight, as long as the pirate vessel didn’t have twice as many guns. Failing to resist would result in the commander being excluded from any further commands of English ships and even imprisonment.
The sailors on merchant vessels were also required to fight, if ordered to. Failure to do so resulted in a loss of wages and imprisonment with hard labour for up to six months. A seaman would receive no punishment if he was violently prevented by the rest of the crew from carrying out his duty, those who hindered him being punished by death. Any crewmen who were injured or maimed defending a ship would receive compensation, and if killed, their widows and children would receive it instead. Additionally, if the seamen managed to capture the pirate vessel, they’d be entitled to a share of the prize money.
Whereas it often happeneth that Masters and Commanders of Merchants Shipps doe suffer their Shipps to be boarded, and their Goods to be taken out by Pirates and Sea-rovers, notwithstanding they have sufficient force to defend themselves, whereby not onely the Merchants are much pp[re]judiced but the Honour of the English Navigation is thereby much diminished, and Merchants discouraged from ladeing their Goods on Board English Shipps to the decay of Shipping. In the pp[re]servation of which the Wealth, Honour and Safety of this Nation is soe much concerned, To which the said Masters are incouraged by a practice used towards them by the Turkes and others who after they have taken out the Goods as encouragement to Masters of Shipps to yeild, doe not onely restore the Shipp with such Goods as are claimed by the Masters or Seamen but many times pay unto the Masters all or some part of the Freight, which hath many times caused suspition of Treachery in the said Masters to the great Dishonour of the English Nation. For the pp[re]vention thereof for the future and for the better incouragement to Merchants as well Forreigners as English to freight and use English Shipps Bee it enacted by the Kings most excellent Majestie by and with the advice and Consent of the Lords Spirituall and Temporall and Commons assembled in Parlyament and by authorise of the same That where any Goods or Merchandices shall be laden on Board [any] English Shipp, which Shipp shall be of the Burthen of two hundred Tunns or upwards and mounted with sixteene Gunns or more, if the Master or Commander shall yeild up the said Goods to any Turkish Shipps or Vessells, or to any Pirates or Sea rovers whatsoever without fighting, that then and in such case the Master shall upon proofe thereof made in the High Court of Admiraltie be from thenceforth incapeable of takeing charge of any English Shipp or Vessell as Master or Commander thereof; and if he shall at any time thereafter presume to take upon him to command any English Shipp or Vessell, he shall suffer Imprisonment by Warrant from the said Court dureing the space of six months for every such Offence; And in case the persons soe takeing the said Goods shall release give backe or lett passe the said Shipp shall pay unto the said Master any Summe or Summes of money, or any goods in lieu of money for Freight or other reward or gift, That in all or any such cases the said goods or money soe given or the value thereof, as alsoe the Masters part of such Shipp her Tackle, Apparell and Furniture soe released, given backe or lett passe, out of which the said goods were taken shall be lyeable to repaire the persons whose goods were soe delivered or taken by Action in the High Court of Admiralty, And in case the Commanders or Masters part of the Shipp, Tackle, Apparell and Furniture together with such money and goods given as aforesaid shall not be sufficient to repaire all the Dammages sustained, then the Reparations to be recovered on the Masters or Commanders part of the Shipp to be divided pro rata amongst the persons prosecuting and proveing their Damages, and the persons damaged to have their Action against the Master for the Remainder.
— The Piracy Act 1670, Reasons for passing this Act.
You can read the full act or download it from legislation.gov.uk.