In modern day communication systems, the massive MIMO architecture plays a pivotal role in enhancing the spatial multiplexing gain, but vice versa the system energy efficiency is compromised. Consequently, resource allocation in-terms of antenna selection becomes inevitable to increase energy efficiency without having any obvious effect or compromising the system spectral efficiency. Optimal antenna selection can be performed using exhaustive search. However, for a massive MIMO architecture, exhaustive search is not a feasible option due to the exponential growth in computational complexity with an increase in the number of antennas. We have proposed a computationally efficient and optimum algorithm based on the probability distribution learning for transmit antenna selection. An estimation of the distribution algorithm is a learning algorithm which learns from the probability distribution of best possible solutions. The proposed solution is computationally efficient and can obtain an optimum solution for the real time antenna selection problem. Since precoding and beamforming are also considered essential techniques to combat path loss incurred due to high frequency communications, so after antenna selection, successive interference cancellation algorithm is adopted for precoding with selected antennas. Simulation results verify that the proposed joint antenna selection and precoding solution is computationally efficient and near optimal in terms of spectral efficiency with respect to exhaustive search scheme. Furthermore, the energy efficiency of the system is also optimized by the proposed algorithm, resulting in performance enhancement of massive MIMO systems.