It is of great significance to study the weak harmonic signal detection from strong chaotic background. Current detection methods mainly use the chaotic phase space reconstruction method based on Takens theory, among which the neural network method has attracted the most attention. However, these methods require high signal-to-interference-plus-noise ratio (SINR) and are sensitive to Gaussian white noise, etc. Noticing the fact that the second-order statistical properties of chaotic signals are stationary, we propose a harmonic signal detection method from strong chaotic background based on optimal filter. We first construct a data matrix, whose rows are the detection signal and reference signals. The reference signals only contain chaotic interference. Then we calculate the one-dimensional fast Fourier transformation of the data matrix to make each column of the matrix form a frequency channel. The harmonic signal can be detected by searching each frequency channel in the frequency domain, thus the signal detection problem is converted into an optimization problem. Further, we use the optimization theory to design a filter such that it can maintain the gain of the signal from the current frequency channel and suppress signals from other frequency channels as far as possible. Finally, the harmonic signal can be obtained by calculating the output SINR of each frequency channel. In order to reduce the calculation, we can further design a local region optimal filter. We choose part of frequency channels to constitute a local area, thus the dimension of the chaotic interference covariance matrix is greatly reduced. Theoretically speaking, the more the number of auxiliary frequency channels, the better the detection results are. However, in the practical application, choosing two channels on the left and right side of current channel each can obtain a very good detection effect. After obtaining the chaotic interference covariance matrix, we can further achieve the output SINR of each frequency channel. Compared with the traditional methods, the proposed method has the following advantages: 1) it can detect a weak harmonic signal under lower SINR; 2) it can detect a greater range of signal amplitude; 3) it is robust against white Gaussian noise. The simulation results with taking Lorenz system as the strong chaotic background show that the proposed method still has a very good detection effect when SINR =-81.03 dB, and the stronger the harmonic signal, the better the detection effect is, while the neural network method can work under the condition of SINR higher than -67.03 dB; the proposed method still can correctly detect the target signal in the case that the SNR is as low as -20 dB, but the neural network method has a poor detection effect under the same condition.