Barnes was born in Santa Clara, California, to a Caucasian mother and an African American father. He attended Del Campo High School in Fair Oaks, California, where he was a letterman in football and basketball. He earned All-American, All-State, All-CIF, All-City, and All-League honors in each sport.
Barnes played four seasons of college basketball at UCLA, where he was an All-Pacific-10 Honorable Mention selection in 2001.
Barnes was selected with the 46th overall pick by the Memphis Grizzlies in the 2002 NBA draft, and was immediately traded along with Nick Anderson, to the Cleveland Cavaliers for Wesley Person. The Cavaliers assigned him for the NBA D-League, and he joined the Fayetteville Patriots for the 2002–03 season.
Barnes signed with the Long Beach Jam of the ABA for their inaugural season in 2003, where he played with Dennis Rodman. The team went 24-7 and won the ABA Championship. Barnes averaged 18.9 points and 6.8 rebounds, and was able to turn his performance into a contract with the Los Angeles Clippers for the second half of the 2003-04 season.
In October 2004, he signed with the Sacramento Kings. He made his debut for the Kings recording 17 points and 9 rebounds, establishing himself as a key rotation player for Sacramento. He was traded halfway through the 2004–05 season along with Chris Webber to the Philadelphia 76ers, in exchange for Kenny Thomas, Corliss Williamson and Brian Skinner. He did not suit up for Philadelphia that season while recovering from a knee tendinitis, and was given an injury release.
Barnes signed a free agent contract with the New York Knicks in October 2005. Although he appeared to secure a starting job with an impressive preseason and Allan Houston's retirement, he was waived by the Knicks after playing just six games. He was then claimed by the 76ers to serve a second stint in Philadelphia, where he finished out the season.
Barnes signed with the Golden State Warriors before their first day of training camp in October 2006, and effectively raised his status in the league since joining the team. With struggling forward Mike Dunleavy, Jr. placed on the bench, Barnes was given more playing time by coach Don Nelson. On December 26, 2006, he hit seven three-point field goals to tie a Warriors franchise record. The record was broken later that season by Jason Richardson, who hit 8 three-pointers on March 29, 2007. Barnes, a high-school All-American wide receiver, says that if he had not been signed by the Warriors he would have tried out for the NFL.
Before signing with Golden State, Barnes had only made 10 three-pointers in his career. In the 2006–07 season, he made 106. After joining Golden State, Matt's offense improved impressively, from 3 points a game in Philadelphia to 9.8, appearing in 76 games. He also added a strong 2007 post-season, with 11.1 ppg and 5.7 rpg in eleven playoff games and helped the #8 seed Warriors take down the #1 seed Mavericks in the 2007 playoffs.
On August 6, 2007, Barnes returned to the Warriors under a one-year contract.
Barnes, along with teammates Stephen Jackson and Baron Davis, served as a Warriors team captain for the 2007–08 season. He was not expected to return for the 2008–09 season.
On July 22, 2008, Barnes signed a one-year contract with the Phoenix Suns. On November 14, 2008, Barnes received a two-game suspension for his role in the scuffle with Houston's Rafer Alston two days earlier.
On July 23, 2009, Barnes signed a two-year deal with the Orlando Magic. Although he was able to opt out of his deal after the first year, Barnes stated that he would like to remain in Orlando. After the Magic were eliminated in the 2010 NBA Playoffs by the Boston Celtics, Barnes announced he would opt out of the final year of his contract.
On July 23, 2010, Barnes signed with the Los Angeles Lakers.
Barnes signed with the Los Angeles Clippers in September 2012. On October 31, 2012, the NBA suspended Barnes for one game after he pleaded no contest to a misdemeanor for resisting, delaying or obstructing a police officer. In June 2013, Barnes was named Defensive Player of the Year for the Clippers. On July 10, 2013, Barnes re-signed with the Clippers to a multi-year deal. In November 2013, Barnes was fined $25,000 for not leaving the court in a timely manner after an ejection in a game against the Oklahoma City Thunder and for using his Twitter account during the game in violation of the NBA's rules.
During the 2014–15 season, Barnes was fined multiple times. On December 13, he was fined $25,000 for kicking a water bottle and using language during a game against the Washington Wizards. On January 25, 2015 he was fined $25,000 for what was said to be inappropriate language directed towards a fan during a game against the Phoenix Suns, although Barnes said that it was directed towards the Suns' owner. On May 8, he was fined $50,000 for remarks made to James Harden's mother during a playoff game against the Houston Rockets.
On June 15, 2015, Barnes was traded, along with Spencer Hawes, to the Charlotte Hornets in exchange for shooting guard Lance Stephenson.
Later that month, on June 25, Barnes was traded again, this time to the Memphis Grizzlies in exchange for Luke Ridnour. The move reunited Barnes with the team that originally drafted him in 2002. On December 28, 2015, Barnes was suspended by the NBA for two games for a physical altercation with New York Knicks coach Derek Fisher at the home of Barnes' estranged wife in Southern California in October. On January 13, 2016, the NBA Players Association filed a grievance on behalf of Barnes to get his two-game suspension without pay rescinded. Four days later, he was fined $35,000 by the NBA for publicly defending his violence towards Fisher in their October scuffle. On February 24, he scored a season-high 25 points in the Grizzlies' 128–119 win over the Los Angeles Lakers. On March 11, he recorded his first career triple-double with 26 points, 11 rebounds and 10 assists in a 121–114 overtime win over the New Orleans Pelicans.
On July 9, 2016, Barnes signed with the Sacramento Kings. On February 20, 2017, he was waived by the Kings to make room for the three players the Kings acquired in the DeMarcus Cousins trade.
On March 2, 2017, Barnes signed with the Golden State Warriors. The Warriors' starting forward, Kevin Durant, went down with a MCL injury, which left the team in need of a replacement forward. Barnes started in 5 games out of his 20 games played with the Warriors in the regular season. Barnes helped the Warriors win the 2017 NBA Championship after defeating the Cleveland Cavaliers 4–1 in the NBA Finals, giving Barnes his first championship ring after 14 seasons in the NBA and 16 years in professional basketball. The Warriors finished the playoffs with a 16–1 record, the best postseason winning percentage in NBA history.
Barnes' younger brother Jason played football in the Canadian Football League. Barnes was married to Gloria Govan, who appeared in VH1's Basketball Wives and Basketball Wives: LA, and the couple had twin boys. Barnes was arrested in 2010 on suspicion of domestic violence against Govan, and for driving with a suspended license and threatening a police officer in July 2012. They separated in 2014.