You are not, [O Muhammad], by the favor of your Lord, a madman.
Tafseer
{ ما أنت } يا محمد { بنعمة ربك بمجنون } أي انتفى الجنون عنك بسبب إنعام ربك عليك بالنبوة وغيرها وهذا رد لقولهم إنه مجنون.
{You are not} O Muhammad {mad, by the grace of your Lord} meaning madness is no longer present in you because of your Lord’s grace upon you with prophethood and other things. This is a response to their saying that he is mad.