Objective: Detecting atrial fibrillation (AF) from electrocardiogram (ECG) recordings remains a challenging task. In this paper, a new AF detection method was proposed to classify the ECG recordings into one of four classes: Normal rhythm, AF, Other rhythm, and Noisy recordings. Approach: The proposed method comprised preprocessing, feature extraction, and classification. In preprocessing, R-peaks were detected, and RR intervals and delta RR intervals were extracted. In feature extraction, 30 multi-level features were extracted, including AF features (n = 4), morphology features (n = 20), RR interval features (n = 2), and features of similarity index between beats (n = 4). In classification, these features were used to train an AdaBoosted decision tree ensemble for classifying ECG recordings into the four classes. The decision tree ensemble was trained with 100-fold cross-validation on the training dataset (n = 8528) provided by the 2017 PhysioNet/Computing in Cardiology (CinC) Challenge. Main results: The trained classifier was submitted to the Challenge for testing on the unavailable test dataset (n = 3658); the official F1 scores for ‘Normal’, ‘AF’, ‘Other’ were 0.91, 0.82, and 0.73, respectively, and the overall F1 score was 0.82 (ranking equal 5th with eight other algorithms in the 2017 PhysioNet/CinC Challenge). Significance: The proposed algorithm may be used as a new method for AF detection.