I have culled a few relevant responses from Puritan divines to this question, who draw upon the cases of Rahab the harlot and the Hebrew midwives of Egypt, in discussing whether such a lie uttered for the greater good of saving a life may be justified. May we indeed do evil that good may come?
Richard Baxter, A Christian Directory, p. 360:
Quest. II. 'Is it not contrary to the light of nature, to suffer e. g. a parent, a king, myself, my country, rather to be destroyed, than to save them by a harmless lie?'
Answ. No. Because, 1. Particular good must give place to common. And if once a lie may pass for lawful in cases where it seemeth to be good, it will overthrow human converse, and debauch man's nature and the world.
2. And if one evil may be made a means for good, it will infer that other may be so too, and so will confound good and evil, and leave vicious man to take all for good which he thinks will do good. That is not to be called a harmless lie, which is simply evil, being against the law of God, against the order of nature, the use of human faculties, and the interest and converse of the sociable world.
3. The error of the objectors chiefly consisteth in thinking that nothing is further hurtful and morally evil, than as it doth hurt to some men in corporal respects. Whereas that is evil, which is against the universal rule of rectitude, against the will of God, and against the nature and perfection of the agent; much more if it also tend to the hurt of other men's souls, by giving them an example of sinning.
4. And though there may sometimes be some human probability of euch a thing, yet there is no certainty that ever it will so fall out, that a lie shall save the life of king, parent, or yourselves. For God can open the eyes of that enemy whom you think to blind by a lie, and cause him to know all the truth, and so take away that life, which you thought thus to have saved.
5. And there are lawful means enough to save your lives when it is best for you to save them. That is, Obey God, and trust him with your lives, and he can save them without a lie, if it be best: and if it be not, it should not be desired.
6. And if men did not erroneously overvalue life, they would not think that a lie were necessary for it. When it is not necessary to live, it is not necessary to lie for life. But thus one sin brings on another: when carnal men overvalue life itself, and set more by it than by the fruition of God in the glory of heaven, they must needs then overvalue any means which seemeth necessary to preserve it. See Job xiii. 7—10; Prov. xiii. 17; Rom. vi. 15; iii. 7—9; Psal. v. 7; Hos. iv. 2; John viii. 44; Rev. xxi. 27; xxii. 15; Col. iii. 9; 1 John ii. 21.
7. Yet as to the degree of evil in the sin, I easily grant (with Augustine, Enchirid.) that Multum interest quo animo et de quibus quisque mentiatur: non enim ita peccat qui consulendi, quomodo ille qui nocendi voluntate mentitur: nee tantum nocet qui viatorem mentiendo in adversum iter mittit, quantum is qui viam vitae mendacio fallente depravat.
Object. 'Are not the midwives rewarded by God for saving the Israelitish children by a lie?'
Answ. I need not say with Austin, "The fact was rewarded, and the lie pardoned;" for there is no such thing as a lie found in them. Who can doubt but that God could strengthen the Israelitish women to be delivered without the midwives? And who can doubt but when the midwives had made known the king's murderous command, that the women would delay to send for the midwives, till, by the help of each other, the children were secured? Which yet is imputed to the midwives, because they confederated with them, and delayed to that end. So that here is a dissembling and concealing part of the truth, but here is no lie that can be proved.
Object. ''But Heb. xi. 31., and James ii. 25., Rahab is said to be justified by faith and works, when she saved the spies by a lie.'
Answ. It is uncertain whether it was a lie, or only an equivocation, and whether her words were not true of some other men that had been her guests. But suppose them a lie, (as is most like,) the Scripture no more justifieth her lie, than her having been a harlot. It is her believing in the God of Israel, whose works she mentioned, that she is commended for, together with the saving of the spies with the hazard of her own life. And it is no wonder if such a woman in Jericho had not yet learned the sinfulness of such a lie as that.
Object. 'But at least it could be no mortal sin, because Heb. xi. 31., and James ii. 25., say she was justified.'
Answ. It was no mortal sin in her, (that is, a sin which proveth one in a state of death,) because it had not those evils that make sin mortal: but a lie in one that doth it knowingly, for want of such a predominancy of the authority and love of God in the soul, as should prevail against the contrary motives habitually, is a mortal sin, of an ungodly person. It is pernicious falsehood and soul delusion in those teachers, that make poor sinners think that it is the smallness of the outward act or hurt of sin alone, that will prove it to be, as they call it, venial, or mortified, and not mortal.
Thomas Ridgeley, A Body of Divinity (repub. as Commentary on the Larger Catechism), Vol. 2, p. 407:
Another inquiry is, what judgment we must pass concerning the actions of Rahab, the harlot, who invented an officious lie, to save the spies from those who pursued them. It is said, 'she took two men and hid men:'y and, at the same time, pretended to those who were sent to inquire of her concerning them, that 'she wist not whence they were,' but that they 'went out of the city about the time of the shutting of the gate, though whither they went she knew not.' The main difficulty we have to solve is what the apostle says in apparent commendation of this action, 'By faith Rahab perished not with them that believed not, when she had received the spies in peace,' that is, she protected them, and did not betray them into the hand of their enemies. But this act of faith does not relate directly to the lie which she invented to conceal them; for, doubtless, she would have been more clear from the guilt of sin, had she refused to give the messengers any answer relating to them, and so had given them leave to search for them, and left the event to providence. This, indeed, was a very difficult duty; for it might have endangered her life; and her choosing to secure them and herself, by inventing this lie, brought with it a degree of guilt, and was an evidence of the weakness of her faith. But, on the other hand, that faith which the apostle commends in her, respects some other circumstances attending this action. Accordingly, it is not said that by faith she made the report to the messengers concerning the spies, but, that 'by faith she received them with peace.' Now, there are several things in which her faith was very remarkable. She was confident that 'the Lord would give them the land' which they were contending for.a She makes a just inference relating to this matter, from the wonders which God had wrought for them in the Red sea.b She makes a noble confession, that 'the Lord their God is God in heaven above, and in the earth beneath.'c She put herself under the protection of the Israelites, and desired to take her lot with them; and she did this at the hazard of her life, though she might have saved it, and probably have received a reward, had she betrayed them. This I conceived to be a better vindication of of Rahab's conduct than that which is alleged by some, who suppose that, by entering into confederacy with the spies, she put herself into a state of war with her own countrymen, and so was not obligated to speak truth to the men of Jericho. Such an interpretation is followed by many ill consequences, and gives too much countenance to persons deceiving others, under pretence of being in a state of war with them. As to what the Papists say in her vindication, that a good design will justify a bad action; this is not true in fact, and therefore not to be applied to her case.
Thomas Boston, An Illustration of the Doctrines of the Christian Religion (repub. as Commentary on the Shorter Catechism), Vol. 2, pp. 261-262 [on the sixth commandment]:
Hence it is evident, that a person may not tell a lie, nor do any sinful thing whatever, far less blaspheme, deny Christ or any of his truths, commit adultery or steal, though his own life, or the life of others, may be lying upon it. For where the choice is, suffer or sin, God requires and calls us in that case to suffer. And therefore, the example of such things in the saints, as in Isaac, Rahab, &c. are no more propounded for our imitation, than David's murder, &c. Peter's denial of Christ, &c. And though we read not of reproofs given in some such cases, that will no more infer God's approbation of them than that of Lot's incest, for which we read of no reproof given him. The general law against such things does sufficiently condemn them, in whomsoever they are found.
Object. This is a hard saying. A man may be in the power of some ruffian, that will require on pain of death some sinful thing; and must one sell his life at such a cheap rate, as to refuse to deny his religion, drink drunk with him, or do any such thing for the time:
Ans. It is no more hard than that, Luke xiv.26. 'If any man come to me, and hate not his father, and mother, and wife, and children, and brethren, and sisters, yea, and his own life also, he cannot be my disciple.' We must love God more than our own or other's life, and so must not redeem it by offending God. Sin ruins the soul; therefore says our Lord, Matth. x.28. 'Fear not them which kill the body, but are not able to kill the soul: but rather fear him which is able to destroy both soul and body in hell.'
Fisher's Catechism Q. 78 [on the ninth commandment]:
Q. 12. What is it for a person to make an officious lie?
A. It is to tell a downright untruth, for their own, or their neighbour's safety and security in time of danger, as Rahab did who hid the spies in the roof of her house, and yet alleged they were gone out of the city, and that she knew not where they went, Josh. 2:4-6.
Q. 13. Does not the apostle ascribe this action of hers to her faith, when he says, Heb. 11:31 -- "By faith, Rahab, the harlot, perished not with them that believed not, when she had received the spies with peace?"
A. No; What he ascribes to her faith is, her having received the spies with peace, that is, her having consulted their safety and preservation with the greatest care and diligence; but not the lie she invented in order to conceal them. Her protecting the spies is commended, but not the manner in which she did it.
Q. 14. Who are they that plead in favour of officious lies?
A. The Papists, Socinians, and most of our modern moralists.
Q. 15. What arguments do they allege in defence of this sort of lying?
A. That it has been practised by saints in scripture; and that it is so far from being hurtful to any, that it has been beneficial to some in certain cases.
Q. 16. What answer is to be given to the practice of the saints in this matter?
A. That their sinful failures, in this and other instances, are not recorded in scripture for imitation, but for caution and warning, that we fall not into the same snares.
Q. 17. How do you answer the other argument for officious lying, "That it is so far from being hurtful to any, that it has been beneficial and advantageous to some, in certain cases, particularly in saving the life of a dear friend, or useful member of society, which might otherwise have been manifestly endangered?"
A. It is answered thus, that in no case are we to do evil that good may come, Rom. 3:8. If we are not to speak wickedly for God, nor talk deceitfully for him, according to Job 13:7, neither are we to do so, though it were for the benefit of all mankind, or the best among them.