Reactions of ketenes generated from α-diazoketones with a series of acyclic and cyclic imines were investigated under both microwave and photoirradiation conditions. The results indicate that the zwitterionic azabutadiene-type intermediates yielded from imines and ketenes undergo a conrotatory ring closure exclusively to produce β-lactams. It is notable that no Woodward−Hoffmann product was found under the ultraviolet irradiation. The photoirradiation-induced Staudinger reaction shows a different stereoselectivity from the electrocyclic reaction of substituted 1,3-butadiene.