New piperidylpyrimidine derivatives, including quinazolines, were prepared, and their abilities to inhibit TNF-α production evaluated. Some compounds showed potent inhibitory activity in mouse macrophages stimulated with LPS. The synthesis and structure–activity relationships of these compounds are described.