Verdict
It is not in Guru Nanak's work
It faithfully sums up Nanak's ethics and the Kartarpur life described by Bhai Gurdas, but it does not appear in that form in his compositions in the Guru Granth Sahib: it is a later formula of the Sikh tradition.
Source: McLeod, W. H. Gurū Nānak and the Sikh Religion. Oxford: Clarendon Press, 1968. ISBN 9780198265214 (ed. india, Delhi: Oxford University Press, 1976, ISBN 9780195608069).
What they did say
Verified words of Guru Nanak
«One God. Truth is his name. Creator, without fear, without enmity, of timeless form, unborn, self-existent; attained by the guru's grace.»
Mul Mantar, Guru Granth Sahib, ang 1. Traducción propia.
«True in the beginning, true throughout the ages; true now, says Nanak, and true he shall ever be.»
Japji, salok inicial, Guru Granth Sahib, ang 1. Traducción propia.
«Purity is not attained by washing, though one wash a hundred thousand times; silence is not attained by keeping quiet, though one remain absorbed without end.»
Japji, estrofa 1, Guru Granth Sahib, ang 1. Traducción propia.
