Problem: Psalm 40:6 cites the Messiah as saying “My ears You have opened,” but the writer of Hebrews quotes it as “a body You have prepared for Me” (10:5). There is no similarity whatsoever in these quotations. The NT seems to totally distort this OT passage.
Solution: The difficulty arises here from the fact that the writer of Hebrews cites a version of the Greek translation of the OT (the Septuagint), whereas Psalm 40 was originally written in Hebrew. However, this does not solve the difficulty for anyone who believes in the inspiration of the Bible, since once the NT cites a passage this guarantees its truthfulness. How, then, can this apparent misquotation be resolved?
The solution may lie in the fact that Hebrews is a loose rendition, and Psalms is a more literal translation of the same idea, namely “You have fitted me for obedient service.” The Psalm phrase, “My ears you have opened,” may be a figure of speech referring to the boring of a slave’s ear to signify his willing submission to his master. In which case, Hebrews actually clarifies the meaning of this now obscure figure of speech by its more “loose” rendition.
Others claim this is a synecdoche, in which one part stands for the whole. That is to say, if God is to “dig out the ears” (so that the Messiah can obey God and become a sacrifice for sin), then He must “prepare a body” for Him in which He can enter the world and accomplish His divine mission (cf. Heb. 10:5). Either way would satisfactorily resolve the difficulty and satisfy the principle that the NT citations need not be exact quotations as long as they are faithful to the truth contained in the OT text.
“In burnt offerings and sacrifices for sin thou hast had no pleasure. Then said I, Lo, I come (in the volume of the book it is written of me,) to do thy will, O God. (Heb 10:6-7)”