Changes in the frequency composition of the human electroencephalogram are associated with the transitions to epileptic seizures. Cross-frequency coupling (CFC) is a measure of neural oscillations in different frequency bands and brain areas, and specifically phase–amplitude coupling (PAC), a form of CFC, can be used to characterize these dynamic transitions. In this study, we propose a method for seizure detection and prediction based on frequency domain analysis and PAC combined with machine learning. We analyzed two databases, the Siena Scalp EEG database and the CHB-MIT database, and used the frequency features and modulation index (MI) for time-dependent quantification. The extracted features were fed to a random forest classifier for classification and prediction. The seizure prediction horizon (SPH) was also analyzed based on the highest-performing band to maximize the time for intervention and treatment while ensuring the accuracy of the prediction. Under comprehensive consideration, the results demonstrate that better performance could be achieved at an interval length of 5 min with an average accuracy of 85.71% and 95.87% for the Siena Scalp EEG database and the CHB-MIT database, respectively. As for the adult database, the combination of PAC analysis and classification can be of significant help for seizure detection and prediction. It suggests that the rarely used SPH also has a major impact on seizure detection and prediction and further explorations for the application of PAC are needed.