The accurate and timely diagnosis of Atrial Fibrillation (AF), a common condition presenting as an abnormal heartbeat that often results in serious disease, would assist in reducing morbidity. In this study, we make use of Electrocardiogram (ECG) data in order to create an automatic method for detecting AF. For this purpose, we employed a neural architecture search (NAS) algorithm. The efficiency of NAS algorithms on image classification tasks has been well established, however, studies on using NAS methods for ECG classification are very limited. Our experiments show that our automatically designed neural model performs very well and arguably outperforms currently available deep learning models. This model achieved the accuracy and F1-score of 84.15%± 0.6 and 82.45± 0.2 on the publicly available subset of PhysioNet challenge 2017 dataset, respectively.