Bayesian network is a common approach to study gene regulatory networks. Here, we explore the problem of inferring Bayesian structure from data that can be viewed as a search problem. The goal is to find a global optimized probability network model given the data. In this work, we propose a new search algorithm: Two-level Simulated Annealing (TLSA). TLSA performs simulated Annealing in two levels with strengthened local optimizer, and is less likely to get tracked at local optimizer. To illustrate the value of TLSA in Bayesian structure learning, the algorithms is applied on simulated datasets generated using the Monte Carlo method. The experimental results are compared with other learning algorithm such as K2.