Maliks Muwatta Book 014, Hadith Number 002.

Section : The Prohibition against Relieving Oneself Facing the Qibla.

Yahya related to me from Malik from one of the Ansar that the Messenger of Allah, may Allah bless him and grant him peace, forbade defecating or urinating while facing the qibla.