The typical sphere decoding (SD) algorithm can efficiently achieve the ML detection for the multiple-input multiple-output (MIMO) system. However, the complexity of the SD algorithm increases for high-order modulations, like 16-QAM and 64-QAM. In this work, we propose an efficient detection algorithm for the MIMO system based on the SD algorithm with dynamic search. During the tree search process, we calculate the soft value of each visited node based on the path from the root to this node. The expansion range of each visited node is determined by the soft value and a branch list. With the soft values, we can reduce the ranges of nodes to be searched while maintaining the performance of near-ML detection. For a given branch list, we also give an upper bound of the total number of visited nodes. The channel inversion or channel sorting preprocessing is not necessary. We also consider an improved scheme with the dynamic branch list. For the proposed algorithm, the simulation results show that we can achieve the bit-error rate (BER) close to the optimal ML detection with much lower complexity than the typical SD algorithm.