Detection of atrial fibrillation (AF) is a critical issue of healthcare because it is an increased risk of serious brain infarction due to cerebral embolism despite that it is the commonest sustained arrhythmia. To improve the reliability of the detection of AF by the long-term monitoring of heartbeat signals, we developed machine-learning systems for detecting AF using the Allostatic State Mapping by Ambulatory ECG Repository (ALLSTAR) database of 24-h ambulatory electrocardiograms. Lorenz plot images were generated from consecutive segment of 600 R-R intervals and the pattern of image characteristic to AF was discriminated from those of non-AF segments, including sinus rhythm, frequent atrial ectopic beats, and atrial flutter. Lorenz plot images consisting of 10,035 known AF and 10,107 non-AF samples were provided to the machine learning algorithms of Convolutional Neural Network (CNN). The performance to detect AF was evaluated in the independent 50 samples of 24-h ECG including paroxysmal AF episodes. As the results, the CNN that detected Lorenz plot of AF with 100% sensitivity and 100% specificity was developed through the deep learning. The developed CNN system classified accurately all 24-h ECG data including paroxysmal AF episodes. Lorenz plot imaging of R-R interval dynamics is useful for effectively discriminating AF from non-AF by artificial intelligence.