A number of p-substituted benzalbarbituric acid derivatives were synthesized by the reaction of p-substituted benzaldehyde with barbituric acid, and their nonlinear optical properties were investigated by using the Kurtz powder test. p-acetamidobenzalbarbituric acid derivatives were found to exhibit the relatively high second-harmonic intensity and have the higher thermal stability.