The invention relates to a cultivation and seedling growing matrix for melons and vegetables. The matrix is formed by uniform mixing of the following raw materials by weight: 10-25% of urea formaldehyde resin foam particles, 15-35% of fermented two-mushroom residue, and 30-55% of peat. The preparation method of the fermented two-mushroom residue includes: mixing agaricus bisporus residue with flammulina velutiper residue according to 1:(0.7-1.2), conducting windrow fermentation, when the temperature reaches above 65DEG C, conducting pile-turning once every day, and when water decreases to less than 40%, conducting sieving by a 5mm sieve, thus obtaining fluffy fermented two-mushroom residue. The urea formaldehyde resin foam involved in the invention is granular and has small particle size, is convenient for water retention and air permeability, is beneficial to rooting and fast sprouting, and also puts an end to the use of perlite and vermiculite, reduces the dust harmful to the human body in production, and has pH of 5.5, and after uniform mixing with the fully fermented two-mushroom residue, the pH is about 6.5. By using the above three raw materials, discharge of solid waste is reduced. As the urea formaldehyde resin foam particle production involves certain formaldehyde, various pathogens in the seedling growing and cultivation matrix can be effectively killed, thus avoiding the investment of bactericide before use by a user.