The perceptron learning algorithm and its multiple-layer extension, the backpropagation algorithm, are the foundations of the present-day machine learning revolution. However, these algorithms utilize a highly simplified mathematical abstraction of a neuron; it is not clear to what extent real biophysical neurons with morphologically-extended nonlinear dendritic trees and conductance-based synapses could realize perceptron-like learning. Here we implemented the perceptron learning algorithm in a realistic biophysical model of a layer 5 cortical pyramidal cell. We tested this biophysical perceptron (BP) on a memorization task, where it needs to correctly binarily classify 1000 patterns, and a generalization task, where it should discriminate between ‘noisy’ patterns drawn from one of two probability distributions. We show that, for most cases, the BP performs these tasks with an accuracy comparable to that of the original perceptron. We concluded that cortical pyramidal neurons can act as powerful classification devices.