  Six-dimensional conformal field theories with $(2,0)$ supersymmetry are shown
to possess a protected sector of operators and observables that are isomorphic
to a two-dimensional chiral algebra. We argue that the chiral algebra
associated to a $(2,0)$ theory labelled by the simply-laced Lie algebra
$\mathfrak{g}$ is precisely the W algebra of type $\mathfrak{g}$, for a
specific value of the central charge. Simple examples of observables that are
made accessible by this correspondence are the three-point functions of
half-BPS operators. For the $A_n$ series, we compare our results at large $n$
to those obtained using the holographic dual description and find perfect
agreement. We further find protected chiral algebras that appear on the
worldvolumes of codimension two defects in $(2,0)$ SCFTs. This construction has
likely implications for understanding the microscopic origin of the AGT
correspondence.
