In Shakespeare's play, Hamlet, in Act Four, scene seven, Claudius is speaking to Laertes, who has returned to Elsinore castle, prepared to seek vengeance on Hamlet for Polonius's murder.
Claudius has cautioned Laertes from being rash in killing Hamlet outright. He suggests that between the two of them, they can bring about Hamlet's death so that no guilt will fall on either of them, and even Hamlet's mother will think it is an accident.
The irony of the quote given is that Claudius would think Hamlet so innocent. In other words, even after all that his nephew has done—with the manipulation of the play to ascertain the King's guilt in the murder of Old Hamlet, Polonius' murder (which the King admits could have been him), and even his escape from Rosencrantz and Guildenstern—Claudius still considers Hamlet to be generous, weak and lacking in treachery or deceit. Ironically, despite Claudius' perceptions, Hamlet is not lacking in deceit and he is not weak (indecisive, perhaps), but he has been very astute in trying to stay one step ahead of Claudius and tricking him into revealing his guilt.
The entire quote is:
[Hamlet], being remiss,
Most generous and free from all contriving,
Will not peruse the foils [swords] (IV.vii.147-149)
Claudius assures Laertes that Hamlet will be completely unsuspecting that the swords may have been tampered with (poisoned), and that Claudius and Laertes will have nothing to worry about in their plot to murder Hamlet. However, Hamlet is no fool: he has learned his lessons well by now, and he suspects treachery from the King; but he is committed to his purpose of avenging his father's death, so he agrees to the "game" of swords...and possible betrayal.